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 created by default. In this article, we will discuss what benefits and possibilities you’ll have with server-side Google Analytics And how to configure Google Analytics in your Google Tag Manager Server account.
If you don’t yet have a GTM server container, please follow this instruction on how to launch it on your website. Maybe you’re still not sure what GTM server tagging is and how it can benefit your website tracking, 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 not available in a free plan, you’ll need to update to one of the paid plans; please check our pricing.
In 2020, roughly 27% of internet users are using ad blockers. It means that a little bit more then a quarter of paid ads will never reach their audiences and won’t be tracked inside GA. This number is expected to grow by 2-3% each year.
Not only ad blockers prevent your tracking form collecting all data about website visitors. Some browsers started 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 didn’t announce anything similar to ITP, they 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 the 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. 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 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.