Google Tag Manager server container has close integration with Universal Analytics. When you set up GTM server tagging, you will see that Universal Analytics Client is created by default. In this article, we will discuss the benefits and possibilities that server-side Google Analytics offers. And also, how to configure Google Analytics in your Google Tag Manager Server account.If you don’t have a GTM server container yet, please follow this instruction on how to launch it on your website. If you are still not sure what GTM server tagging is and how it can benefit your website tracking system, please read this blog post.
What are the benefits of implementing Google Analytics Server-Side tracking?
1. Bypass Ad Blocker and ITPs
There are two ways of implementing Google Analytics within a server-side container: host it on your subdomain or our domain. Hosting on your subdomain gives you the massive benefit of bypassing AdBlocker and Intelligent tracking preventions. A custom subdomain feature is not available in a free plan, so you’ll need to update to one of the paid plans; please check our pricing.
In 2020, roughly 27 percent of internet users are using ad blockers. It means that a bit more than a quarter of paid ads will never reach their audiences. And this number is expected to grow by 2-3% annually.
Not only ad blockers prevent your tracking from collecting all data about website visitors. Some browsers are now using Intelligent tracking prevention technology, which is designed to stop 3rd party cookies. Firefox launched it in 2019; Safari began using ITP in autumn 2020. Though Chrome still has not announced anything similar to ITP, it started blocking third-party pixels by default in the incognito mode.
With server-side tagging, you could create a tagging URL within a custom subdomain that is located in the same hierarchy as your website domain; for example, gtm.yourdomain.com. In this case, collect requests will be sent not to google-analytics.com, but your gtm.yourdomain.com. This way, you will make GA request the first party, and it would be blocked by ITPs and AdBlockers.
2. Increase cookie lifetime.
Safari and Firefox are limiting the cookie lifetime to 7 days or, in some cases, to 24 hours. It means that unless a user is revisiting your site every day and cookies are continuously updated, it will expire in 1 or 7 days. And Google Analytics will record these visitors as new. There is a website that helps you to track the latest information about browser storage updates.
Currently, the only way to avoid this is to run Google Analytics via Server-Side Google Tag Manager. This feature is enabled by default, but we recommend checking it to be 100% sure that cookie lifetime is set up to a more extended period.
How to Set Up Google Analytics Inside Google Tag Manager Server-Side Container?
- Create Google Tag Manager Server-Side container if you haven’t created one. Please follow these instructions.
- Add a custom subdomain if you want to bypass adblockers and increase cookie lifetime. Follow these instructions.
- Make sure you’ve changed the tagging URL inside your Google Analytics variable within Google Tag Manager Web Container. Inside Google Tag Manager Web Container, go to Variables -> Choose your Google Analytics variable -> More Settings -> Advanced Configuration -> Past Transport URL.
4. Set up Universal Analytics Tag inside GTM Server Container. Open the “Tags” section inside Server-Side GTM Container and Click “New.”
Name Your Tag, choose tag type “Universal Analytics.”
Create a trigger. Trigger type “Custom,” choose “Some Events.” Client Name equals Universal Analytics.
You might not see the Client Name variable in the dropdown. In this case, open the Variables tab, click Configure, and enable all variables.
5. Now let’s open the preview mode of your server Google Tag Manager and make sure that it sends events to Google Analytics. You should see your standard pageview event and custom events that you send via web GTM.
That’s it! Now your Google Analytics runs via server container. Please let us know if you have any questions or need clarifications about implementing server Google Analytics.