Server-side tracking
Server-side tracking is a method of collecting visitor data via your server instead of the user's browser. It provides more accurate data, better privacy compliance and is unaffected by adblockers and browser limitations.
What is server-side tracking?
Traditional (client-side) tracking runs JavaScript in the user’s browser, which sends data directly to Google Analytics, Facebook, etc. 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 what data is sent and eliminates the reliance on browser technologies.
Client-side vs. server-side tracking
- Client-side: JavaScript in the browser sends data directly to third parties (Google, Facebook, etc.). Simple to set up, but vulnerable to ad blockers, ITP, and cookie restrictions.
- Server-side: Data is sent to your server first, which then 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 use 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 via JavaScript. Server-side tracking sets cookies from your own server, which provides a longer lifespan.
- Data quality: You have precise control over exactly which data is sent and can enrich it with server-side information (e.g., order value from the database).
- Privacy compliance: You can filter PII (personally identifiable information) on the server before it is sent to third parties.
- Faster Pages: Fewer JavaScript tags in the browser result in faster load times.
How it works technically
- A simple JavaScript snippet sends events to your own tracking subdomain (e.g., track.dinshop.dk).
- 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, etc.).
Platforms that support server-side tracking
- Google Analytics 4 (GA4): Full support via 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, 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 via the Stape integration.
- Facebook Conversions API: Shoporama automatically sends conversion data server-side to Facebook, regardless of browser limitations.
- DNS Configuration: Set up a tracking subdomain with an A record and a CNAME pointing to your tracking server.
- Automatic Data Sync: Conversion data is continuously synced from the online store to the tracking server.
How to Use Shoporama
Guides that demonstrate the concept in practice
Server-side tracking in Shoporama
A Complete Guide to Server-Side Tracking in Shoporama. Better data quality, fewer ad-blocker losses, product IDs that...
Shoporama Tracking Engine: Server-side tracking for all major platforms
Shoporama's tracking engine (developed with 1260 A/S) sends data from your webshop directly to Facebook, Google Ads,...
Implement tracking in a Shoporama theme
Developer Guide to E-commerce Tracking in a Shoporama Theme: Data Layer, Google Tag Manager, Custom Events, and...
We know online marketing in Shoporama
We've been working with online marketing ourselves for decades. As the only shop system in the country, we have spoken multiple times at conferences such as Marketingcamp, SEOday, Shopcamp, Digital Marketing, E-commerce Manager, Ecommerce Day, Web Analytics Wednesday and many more.