How to Add Google Analytics to a WordPress Site
- June 30, 2015
- Posted by: Joey Schmitt
- Category: SEO » Best Practices
Understanding how your audience interacts with your site is essential for any business trying to succeed online. Google Analytics is a free tool that delivers your websites traffic stats straight to its dashboard, and helps you get to know your audience. In this article, we share the importance of using this tool, and provide a step-by-step guide on how to add Google Analytics to a WordPress site.
WHY GOOGLE ANALYTICS IS IMPORTANT
TRACK VISITORS TO YOUR SITE
USER ENGAGEMENT AND ACTIVITIES
This section allows you to track the course of any user visiting your website from start to finish. Here you can learn how long your visitors stay on each of your pages, and your websites overall bounce rate—which is the percentage of users that visit your website and leave after only viewing the page they entered on.
Knowing your websites bounce and exit rates helps you pinpoint the areas on your site that need improvement. If your website isn’t retaining its visitors, then you’ll probably want to figure out how to improve your bounce rate. Google Analytics can let you determine what areas of your website require more work to be done by helping you identify which pages are least liked by your audience, thus enabling you to lower the bounce/exit rates and increase the depth of pageviews.
THE TIME THEY VISIT YOUR SITE
Tracking your audience and monitoring their movement lets you observe which hours in the day are the most active for your website. By learning when users visit your site the most, you can then determine what the best time is for publishing news or posts related to your business on your blog page.
WHERE YOUR TRAFFIC COMES FROM
This area will show you the source for the traffic being directed to your site, as well as the percentage of users originating from each channel. Traffic can come from search engines, referral links, direct links, etc. and Google Analytics provides a complete breakdown for each category.
The analytics in this section provides you with valuable information specific to each traffic source, and as a result allowing you to easily detect the strengths and weaknesses in your online marketing campaign. For example, if Facebook were the top referral source generating the most visits to your website, then the content you post on Facebook would require extra care in order to be exclusive for your audience. If a leading source was an external website, then offering a link exchange or setting up some sort of partnership might prove beneficial for you.
USER INTERACTION WITH WEBSITE CONTENT
As we mentioned earlier, how users interact with your website’s content can be somewhat understood by your website’s bounce rate.
In this section, you can break it down further and experiment with the content by running A/B split tests to learn what material works best for your site. This part will show you the percentage of users that clicked on links, downloaded files or followed a CTA (Call To Action) button.
By eliminating what doesn’t work and focusing on what does, you’re able to save a lot of time and money. With that said, this tool offers a simple platform that allows you to track and monitor your website which is precisely what makes it is so valuable.
HOW TO SIGNUP FOR GOOGLE ANALYTICS
First, you will need to either create a new Google Analytics account on the Google Analytics Signup Page or you can use an existing Gmail account to login and view the analytics dashboard.
Second, once you have signed-in with a Gmail account, you should be prompted to a screen like the one you see below. Simply click sign up and you will be directed to the next screen.
Third, the screen shown below gives you the option to choose between website or mobile app. Double check to make sure that website is selected, and then punch in the required information. The account name can be whatever you would like it to be, but everything else should be entered in correctly.
Once you have completed the form click on the “Get Tracking ID” button. You will then have to agree to the Google Analytics terms and service before continuing.
Finally, after accepting the terms you will find yourself face-to-face with your Google Analytics tracking code for your site. Copy the tracking code to your clipboard and open a new tab to sign in to your WordPress admin.
ADDING GOOGLE ANALYTICS TO WORDPRESS
You may choose one of the following three installation methods to insert your Google Analytics code in WordPress: Plugins, direct paste, and functions.php.
A simple and great plugin to us is Insert Header and Footer. Once you’ve added the plugin, you can paste the code into the footer section in settings page.
Paste the copied code in your theme’s header.php directly after the < body > tag.
This method is for advanced users.
You will need to add your Google Analytics code in your theme’s functions.php. Your code should be inserted in place of the red text below.
Voila! You’ve successfully setup and installed Google Analytics in your WordPress while simultaneously verifying your website with Google. Now you can return to the previous tab showing your analytics overview if you’d like to browse and get acquainted with your options and settings. Keep in mind that it will take 12-24 hours for Google to propagate all of the stats for your website.
Google Analytics is a great way to keep tabs on your site, and an effective tool essential for any website owner trying to succeed. If you have any questions feel free to get in touch with us, we’re always here and happy to help. If you found this article helpful and enjoyed reading it, please share it with your friends through any of your favored social channels!