How To Set Up Google Analytics For Your Website
The fifth step to start a WordPress site is by set up Google Analytics. Of course, your website your site will still work fine without Google Analytics. Yet, it is highly recommended. Because, with Google Analytics data, you will gain more insights about your site visitors. This will surely help you in the long run to enhance your marketing strategy.
About Google Analytics
What is Google Analytics
Google Analytics is a free web analytics service offered by Google Inc. It tracks and reports your website's traffic and provides statistics and analytical tool to help you analyze further. With a wide variety of information from Google Analytics, it will help you to determine your digital marketing effectiveness as well as for search engine optimization (SEO) purpose.
What Information You Can Get From Google Analytics
There is a whole lot of information you can get from Google Analytics about your site visitors. From browser type, device type, network provider, language, location to the information about new and returning visitors.
Apart from that, there is also information about the traffic referral. This will tell you from which site they come from before visiting yours. Or, what keyword they use on the search engine to reach your site. Not to mention, you can also view live data to check how many people currently using your website.
Signing Up For Google Analytics
Now you already know its function, let's set up Google Analytics for your website. First, you have to sign in to your Google account. Or, please create a new Google account if you don't have one.
Next, go to Google Analytics page and click on the Sign up button. You will see a page to set up Analytics account similar to the image below. Then, please fill in all the fields and select your industry and timezone. After that, scroll down to bottom and click on the Get Tracking ID button.
Once you click on the Get Tracking ID, you will see Analytics Terms of Service agreement. Please select the terms of services for your country, read carefully and accept this terms to continue.
After that, you will be sent to the page similar to the following image. Where you will see your tracking ID and tracking code for your website. Please save your tracking ID since you will need it in the next step.
In case you have click somewhere to explore Google Analytics, you can always go back to this page. Just click on the admin setting that looks like a gear icon. Then, navigate to the Tracking Info » Tracking Code located under the Property section of this page. Now, let's add these things to your website.
Add Tracking Code To Website
There are two ways to add tracking code to your website. First, by manually add this tracking code to your site-custom plugin or functions.php. This requires a basic understanding of coding. Second, by using a WordPress plugin.
Although there are many tutorials on the internet suggest adding Analytics tracking code to theme functions.php or header.php, however, I would not recommend it. This is because your tracking code may disappear when you update your theme in the future.
Therefore, I strongly recommend you to add it to the site-custom plugin or to functions.php of your child theme. This way, your tracking code will always be preserved through any update.
Now let's add the following lines to your site-custom plugin or functions.php of your child theme. Please don't forget to change the UA-XXXXXXXX-X on line 3 and 9 with your own tracking ID.
Using A Plugin
While the above method allows you to set up Google Analytics and add tracking code manually, yet, there is an easier way. This is by installing a WordPress plugin. There are several popular WordPress plugins that not only can help you insert the tracking code but also include many great features.
With more than two millions active installations, Google Analytics Dashboard by MonsterInsights is one of the most popular WordPress analytics plugins. With their free version, you can link it to your Google Analytics account and have some basic feature. They also offer a premium version with more features but somewhat a little pricey that makes you think several times before you get it.
Google Analytics Dashboard by ExactMetrics is another one of the most popular analytic plugins in the WordPress directory. It is released under the GPLv2 and can be used on any personal or commercial website. Comes with many great features including real-time stats, multiple reports, custom dimensions, multiple tracking methods and many more. For plugins that are 100% free, this is truly a lifesaver.
GA Google Analytics by Jeff Starr is another great analytics plugin. It comes with multiple tracking method and support for Display Advertising, Enhanced Link Attribution and IP Anonymization. Besides, you can also choose where to place tracking code and the ability to add custom Tracker Objects or custom GA Code.
With all the information you get from Google Analytics will surely help you in the long run. I hope this article help you through the process to set up Google Analytics for your site. If you have any concern or tips about Google Analytics, please kindly share it with us in the comment section.
He is a web developer, a programmer, and a computer technician. He obsessed with coding and enjoy learning new things. In his spare time, he likes to play online games, musical instruments or watching anime and movies.