Google Analytics is so designed by Google to help you analyze your website traffic. Although “web analytics” sounds like a very small area of your digital presence but the implications of Google Analytics are huge. As we know your website is the central hub of your digital presence and your website is the best way to give you an overall view of the effectiveness of all the campaigns you are running in order to promote your product/services online. And Google Analytics is a free tool that can help you out to track your digital marketing effectiveness.
It gives you a deeper understanding of the behavior of the visitors visiting your website. You will be going to get insights on how the users are getting engaged with your content. Moreover, you will get to know where they are located, what language they speak and most importantly how they got to your website. In addition you can see if visitors are using a mobile device or desktop, the time spent on a web page and the time when they leave. And you know what this information is fairly enough to help you improve your Digital Marketing strategy and website.
An Introduction to Global Site tag:
For all the new Google Analytics accounts the Global Site Tags are the recommended tracking method now. You only need a single Global Site Tag or Global Snippet per web page. It is mentioned by Google many times that by using gtag.js you will be able to get benefitted by the latest dynamic features and integrations as they will become available. So it means that very soon Google is going to introduce the new features that will be only accessible by using gtag.js and not necessarily in anaylytics.js.
So, basically Global Site tags are the new JavaScript library from Google. But it is not restricted analytics library only like analytics.js, but it also supports the Google Adwords Conversion tracking and in near future it will support tracking for many other Google products. It would not be correct to call gtag.js the next version of Analytics.js but what Google is trying to do, is to use just one JavaScript library to track all of its products.
It is advisable to use the gtag.js code but it doesn’t mean that if you have the previous conversion tracking tag installed on your website then it will not work. It will still work but the recommendation of using the new conversion tracking tag is just for more accurate conversion measurement. The gtag.js tag should be installed on every page of your website. You will also have to add another piece of code i.e. an event snippet or a phone snippet that is based on the type of conversion you’d like to track, to certain pages on your site. These snippets work simultaneously with the global site tag to track conversions.
What are the Advantages of implementing gtag.js:
- It has a complete conversion of all the conversions in comparison of the previous tags which were not able to track all the conversions. But your Google site tag ensures that all your conversions are taken into account.
- It gives you a more accurate conversion tracking. If you use the global site tag then it sets new cookies on your domain that will store information about the ad click that has brought a user to your site. Which indicates that Google Ads can measure conversions more accurately, The global site tag also let you specify that which interactions with your website should be counted as conversions.
- It provides an easier integration with other Google products. As we earlier discussed gtag.js not only used by Google Ads, but it is used by other Google products such as Google Analytics also. If you use these other Google products then the global site tag makes the website implementation easier by providing a combined tagging experience.
The Global Site tag Works in the following manner:
The global site tag works simultaneously with another piece of code i.e. with an event snippet or a phone snippet in order to track your conversions. If you want to track website conversions the event snippet tells the gtag.js tag, when to track a conversion. In case you are tracking calls to your website then the phone snippet will replace your business phone number with a forwarding number of Google. At the moment you set up conversion tracking for your website, you can view and copy the global site tag for your account and any snippets that you should use with the tag. Please see the below code snippet examples.
Global Site tag
You need to place the global site tag snippet on all pages of your website and that is in the < head > section of your HTML pages. In case you have previously installed a global site tag at the time of creating another conversion action from the same Google Ads account then you shouldn’t add the global snippet again. If you have installed a global site tag on your website from a different Google product for example Google Analytics or from another Google Ads account you need to follow the instructions to adapt the tag so that it can work for your Google Ads account.
Please look at an example of the global site tag:
Event snippet
If you want your website conversion tracking to work properly then you should install the event snippet on the conversion page itself. You can place it anywhere in the code, after the global tag snippet. Our recommendation will be to place it within the
section for the best tracking accuracy.
Please look at an example of event snippet:
Phone snippet
You need to add a phone snippet to the pages on your website where the phone number you would like to track appears. You should place phone snippet right after the global site tag.
Please have a look on the example of a phone snippet:
How to install the code snippet on your website?
The setup will sound a bit technical to you, but don’t worry we will guide you through every step of the process. You can install Google Analytics by directly copy and pasting the code snippet after the opening head HTML tag of all your web page.
The following code snippet is an example of the Global Site Tag. What you will need to do is to replace with the Tracking ID of your Google Analytics property where you want to store the tracking data.
When you add the Global Site Tag on each page of your website then the page views are automatically captured by default. And It is the desired behavior in most of the cases.
But to initiate the function gtag() correctly it’s essential to place the Google Analytics Tracking Code at the top of every page. You can use the commands gtag() at whatever position of your web page code but the thing to keep in mind is that your commands appear below the Tracking Code. Let us make the position clear with a good example of the HTML code.
Page Title
Hello world!
Let's get Digital...
Oke bye!