Server-side tracking
Server-side tracking is a method of collecting visitor data through your server instead of the user's browser. It gives you more accurate data and better privacy compliance, and it is not affected by ad blockers and browser restrictions.
What is server-side tracking?
Traditional (client-side) tracking runs JavaScript in the user's browser, which sends data directly to Google Analytics, Facebook, and so on. Server-side tracking changes this flow: the browser sends data to your own server (or a server-side endpoint), which then forwards it to the relevant platforms. This gives you full control over which data is sent and removes the dependency on browser technologies.
Client-side vs. server-side tracking
- Client-side: JavaScript in the browser sends data directly to third parties (Google, Facebook, and so on). Easy to set up, but vulnerable to ad blockers, ITP, and cookie restrictions.
- Server-side: Data is sent to your server first, which forwards it to third parties. More robust, accurate, and privacy-friendly, but requires server infrastructure.
Why server-side tracking?
- Ad blockers: Up to 30% of users have ad blockers that block client-side tracking scripts. Server-side tracking is invisible to ad blockers.
- ITP and cookie restrictions: Safari and Firefox restrict third-party cookies and first-party cookies set with JavaScript. Server-side tracking sets cookies from your own server, which gives them a longer lifetime.
- Data quality: You control exactly which data is sent and can enrich it with server-side information (such as the order value from the database).
- Privacy compliance: You can filter out PII (personally identifiable information) on the server before it is sent to a third party.
- Faster pages: Fewer JavaScript tags in the browser mean faster load times.
How it works technically
- A lightweight JavaScript snippet sends events to your own tracking subdomain (such as track.yourstore.com).
- A server-side container (typically Google Tag Manager Server-Side) receives the data.
- The server processes, enriches, and filters the data.
- The server forwards the data to the relevant platforms (GA4, Facebook CAPI, Google Ads, and so on).
Platforms that support server-side tracking
- Google Analytics 4 (GA4): Full support through the Measurement Protocol.
- Facebook Conversions API (CAPI): Facebook's server-side tracking solution.
- Google Ads: Server-side conversion tracking for better attribution.
- Pinterest, TikTok, Snapchat, and LinkedIn: All offer server-side APIs.
Server-side tracking in Shoporama
Shoporama has built-in support for server-side tracking:
- Google Tag Manager Server-Side: You can set up a tracking subdomain and connect it to a server-side GTM container through the Stape integration.
- Facebook Conversions API: Shoporama automatically sends conversion data server-side to Facebook, independent of browser restrictions.
- DNS configuration: Set up a tracking subdomain with an A record, an AAAA record, and a CNAME that point to your tracking server. The Tracking page in the admin shows exactly which records your domain needs.
- Automatic data sync: Conversion data is continuously synced from your online store to the tracking server.
How to do it in Shoporama
Guides that show the term in practice
Server-side tracking in Shoporama: GA4, Meta, and Google Ads
A complete guide to server-side tracking in Shoporama. Better data quality, fewer conversions lost to ad blockers,...
Shoporama tracking engine: server-side tracking for all major platforms
Shoporama's tracking engine, developed with the agency 1260 A/S, sends data from your store directly to Facebook,...
Implement ecommerce tracking in a Shoporama theme
Developer guide to ecommerce tracking in a Shoporama theme: the data layer, Google Tag Manager, custom events, and...
We know online marketing at Shoporama
We have worked with online marketing ourselves for decades. As the only e-commerce platform in Denmark, we have spoken several times at conferences such as Marketingcamp, SEOday, Shopcamp, Digital Marketing, E-commerce manageren, Ehandelsdagen, Web Analytics Wednesday, and many more.