Server-Side Tracking In Google Tag Manager (GTM) for Google Analytics 4 And Universal Analytics.
The problem: Privacy, IOS14 and not knowing where customers are coming from makes advertising more difficult.
You've probably already heard about the iOS14 user privacy updates and how cookie restrictions became a major concern. You've also most likely already noticed that a lot of data is lost in Google Analytics, Facebook, TikTok, and Snap. Recent news even shows how the iOS14 update cost Facebook a $250 billion overnight loss in stock value, with Snap losing over 25% of its value.
In 2023, privacy will take another turn, as Google announced last summer that it will phase out third-party cookies for Chrome over the second half of 2023, giving everyone a year and a half to figure out how to adjust.
The Solution: Transforming 3rd party cookies into 1st party by implementing server-side tracking.
What is Server-Side Tracking?
If you are reading this, your tracking is most likely done with a JavaScript code provided by Google Analytics. It's super easy to implement, the tracking code sends all the information from your website to Google Analytics, and GA processes the data and shows you how everything is going. You might have a similar implementation for Facebook via the FB Pixel or even marketing tools such as Klaviyo.
The client-side is where online data collection and processing tools, such as Google Tag Manager, execute. Cookies are downloaded, processed, and sent by your browser when you visit a website. As a result, tracking will not function if the user has an ad or cookie blocker installed.
Server-Side tracking changes this significantly! Instead of sending the data from your website to GA, it will send the data to your own analytics server which then forwards data to Google Analytics, Facebook, Klaviyo, etc.
The data is not owned by GA or FB, it's owned by you, which opens the opportunity to transform 3rd party cookies into 1st party.
What's the difference between Client-Side Tracking vs. Server-Side Tracking?
Client-Side tracking is browser-based tracking via Javascript - which is probably what you have today.
It works, but it's inaccurate if the customer has ad and cookie blockers installed, or if their browser is configured not to run JavaScript. This can lead to missing data, which in turn translates into you never getting the full picture out of your current analytics implementation!
Server-Side tracking is the future and by end of 2023 companies that implement server-side tracking will be able to run profitable marketing and advertisement campaigns.
Server-side tracking is API-based tracking, that sends the data from your website to your tracking server, processes the data via GTM, and forwards the data to Facebook via API using the Facebook conversion API or to Google Analytics.
5 Benefits of Server-Side tracking.
- Overcomes Safari, iOS 14, and AdBlocker challenges - Cookies and scripts on the client side are frequently disabled by ad blockers. Although ad blockers may be able to stop Google Analytics, Facebook, or any other similar requests from your online business, they won't interfere with requests from your own subdomain. Cookies can be kept going longer by using server-side tagging. It will not be affected by iOS' cookie blocking, either.
- More accurate analytics - Currently you can barely trust the data in Google Analytics, on average the data is off by 10% in some cases even more. Server-side tracking will improve data accuracy, you will be able to see even 100% accuracy for Order Data!
- Better Attribution - As data is sent as 1st party vs 3rd party, you are better able to control the cookie lifetime, in some cases, you can even set 2 years vs 30 days or 6 months vs 7 days in Facebook's case. This ultimately results in better attribution as a customer who visits your website from an ad, can return 14 days later and purchase, in this case, this user will not be identified as new, instead, it will be recognized as returning.
- Improved page speed - It's insane looking at page speed and seeing all 3rd party marketing tools loading their tracking javascript, tracking the same thing... with server-side tracking you will be able to track once and send the data to all your marketing tools.
- Multiple data sources - You will be able to connect more data streams to your server container. Connect your Website, your store POS orders, your ERP orders placed over the phone, recurring orders from Re-Charge or any other similar solution, your admin orders, your returns, as well as other data points from your CRM.
What is Google Tag Manager (GTM) Server-Side tagging?
If you already have GTM implemented, you know that within that container you have all the tags and triggers that fire based on specific events. This container is what we call a Client-Side Container.
Instead of sending the data directly to Google Analytics or Facebook, you will send all this data to your own tracking server that you can set up via Google Cloud Platform.
Google Tag Manager now has a new type of container called Server-Side. This container will look at your tracking server, which collects all the data and forwards each request to the correct destination such as Google Analytics, Facebook Klaviyo, or Snap.
How to set up GTM server-side tagging?
Setting up server-side tagging sounds a bit easier than it is in reality. It requires creating a tracking server, validating that the data is received and forwarded correctly to the right destination, setting up the correct tags in the GTM SS container, the clients, and updating the GTM tag on your website to be more resilient against ITPs and ad blockers as well as maintaining the tracking server. We put together a 6-step guide on how to set up GTM server-side tagging.
We provide a comprehensive server-side tagging guide that includes Google Tag Manager Server-Side, Google Analytics 4, Google Ads, and Facebook Conversion API on the server. We walk you through creating your OWN Google Cloud account and validating the data to make your tagging future-proof.
How to set up GTM server-side tagging?
Setting up server-side tagging sounds a bit easier than it is in reality. It requires creating a tracking server, validating that the data is received and forwarded correctly to the right destination, setting up the correct tags in the GTM SS container, the clients, and updating the GTM tag on your website to be more resilient against ITPs and ad blockers as well as maintaining the tracking server. We put together a 6-step guide on how to set up GTM server-side tagging.
We provide a comprehensive server-side tagging solution that includes Google Tag Manager Server-Side, Google Analytics 4, Google Ads, and Facebook Conversion API on the server. We walk you through creating your OWN Google Cloud account and validating the data to make your tagging future-proof.
How much does it cost to set up server-side tagging?
The cost will vary based on your website, the amount of traffic, and the number of requests.
Here is what Google recommends:
"Each server costs approximately $40 each month in production configuration (USD). In the Flexible environment, each server is an App Engine instance with 1 vCPU, 0.5 GB RAM, and 10 GB storage. Running a minimum of three servers reduces the risk of data loss in the event of a server outage."
Let's get started!
In the guides below, you'll find each step explained in detail so you can follow along and set up your Server-Side tagging:
- Step 1: How to create a server-side GTM container
- Step 2: How to set up a custom domain for your GTM server-side container
- Step 3: How to send data to your GTM Server-Side Container
- Step 4: How to preview and debug the server-side container
- Step 5: How to monitor realtime server-side data in Google Analytics 4
- Step 6: How to move the Google Analytics 4 tagging server from testing mode into production mode