Shopify server-side tracking is a tracking architecture in which pixel data is transmitted to ad platforms via a secure server rather than a user's browser. When you factor in iOS 14 updates, browser cookie restrictions and KVKK/GDPR obligations together, a traditional client-side pixel setup is no longer enough for e-commerce stores. In this guide, we take a technical look at what server-side tracking is, why you need it and how to set it up on Shopify.
Why is client-side tracking no longer sufficient?
With client-side tracking, JavaScript tags running in the visitor's browser (such as Meta Pixel, Google Tag and TikTok Pixel) send user behavior to ad platforms. This method was sufficient for most stores prior to 2021; however, three key changes made this structure fragile.
iOS 14+ App Tracking Transparency (ATT): Apple's requirement to ask users for tracking permission on a per-app basis has caused the Meta advertising platform to lose much of its mobile user data. Ad optimization and conversion modeling have been severely weakened.
Browser-based ITP and ETP: Safari and Firefox block third-party cookies by default. Although client-side pixel setup appears to be working in these browsers, a significant portion of attribution data is lost.
Ad blockers: Browser extensions and DNS-based blockers can stop scripts like Meta Pixel, Google Tag and similar before they run in the browser.
How does server-side tracking work?
In server-side tracking, when a user visits a page or makes a purchase, this event is first forwarded to Shopify's server. From there, it is transferred to the advertising platform via an intermediate layer (Google Tag Manager server container or Meta CAPI integration). With Meta CAPI, the event goes directly from Shopify's server to Meta; with sGTM, the GTM web container in the browser first sends the event to your own server container, and that server forwards it to the ad platforms.
On Shopify specifically, two server-side tracking methods stand out, along with a browser layer that feeds them:
Meta Conversions API (CAPI): The API that sends conversion data from Facebook and Instagram ads directly to Meta's servers. It can be set up through Shopify's native CAPI integration or third-party apps.
Google Tag Manager Server Container (sGTM): The server-side version of GTM. It is used to send data to Google Analytics 4, Google Ads and other platforms. It is hosted on a cloud service (such as Google Cloud or Stape.io).
Shopify Web Pixels (Custom Pixels): The sandbox structure Shopify introduced in 2022; it is a client-side method, not a server-side one. Tracking code runs in the visitor's browser, in a sandbox isolated from the store pages, and is tied to consent management; it is the browser leg of a server-side setup (CAPI/sGTM).
Consent Mode: How to Combine User Consent with Tracking
Consent Mode is an API developed by Google that allows platforms to collect limited data before the user grants cookie consent. If the user does not allow it, statistical modeling comes into play instead of the actual conversion data.
On Shopify, running server-side tracking without setting up Consent Mode properly can be risky under KVKK and GDPR. The correct flow is as follows:
- The user lands on the site and sees the cookie banner
- If the user agrees, client-side and server-side pixels run at full capacity
- If the user declines, only strictly necessary cookies stay active and no marketing pixels fire
- Missing data is partly estimated with Consent Mode's statistical modeling
Server-side tracking is not a tool to collect more data without user approval. An incorrectly configured CAPI integration can continue to send data to Meta even if the user refuses, which creates a serious risk of violating KVKK and GDPR. Consent management and tracking infrastructure should be set up together.
KVKK and Cookie Management on Shopify
Shopify stores in Turkey have some obligations under the KVKK (Personal Data Protection Act). GDPR also applies to stores selling to Europe. To add basic KVKK consent and ETBİS steps to your store, you can set up KVKK and ETBİS compliance with CompliTR.
Cookie Categories

The Shopify Customer Privacy API allows stores to turn pixels on and off based on user preferences. This API works together with Shopify Web Pixels; marketing cookies are not triggered without user consent.
Turkey-Specific Requirements
Under KVKK, explicit consent is mandatory for non-essential cookies (analytics and marketing). Every pixel that collects IP addresses, device information or behavioral data for marketing purposes falls within this scope. A cookie banner consent mechanism must be in place for every third-party script running on your Shopify store.
The Customer Privacy API, which Shopify updated in 2023, meets basic obligations, but an app like OneTrust, Cookiebot, or Pandectes should be preferred for advanced category management, consent logging, and audit logging. KVKK's obligation to register personal data processing requires you to document which application collects which data.
How to Set Up Server-Side Tracking in Shopify?
Meta CAPI Setup
Shopify's native Meta integration provides a simple CAPI setup, but full event matching needs additional configuration. To handle Pixel and Conversions API setup together with your ad management, take a look at our Shopify Meta ad management service.

- Shopify Admin → Sales Channels → Facebook & Instagram
- Enable the “Maximum” option in the Data Sharing setting
- Verify your domain in Events Manager and use the Test Events screen to check that CAPI events are matched to pixel events by event_id (deduplication)
- Verify that server and browser events do not conflict with the Test Events tool
For advanced setup, custom CAPI integration via Shopify Customer Events (Web Pixels) or tools such as Stape.io and Elevar can be used.
Google SGTM Setup
- Create GTM server container on Google Cloud or Stape.io
- Install the GTM web container on Shopify and point it to the server container URL
- Create server-side tags for GA4 and Google Ads
- Configure Consent Mode v2 triggers
- Verify event flow in Preview mode
Event Conflict Control
The same conversion can be counted twice when client-side and server-side pixels run at the same time. To avoid this “event deduplication” problem, the event_id parameter must be sent to both the client and server event with the same value; the platform filters repeats using this value.

Frequently Asked Questions
Why is server-side tracking needed in Shopify?
Client-side pixels lose a significant portion of conversion data due to iOS 14 restrictions, ITP/ETP and ad blockers. Server-side tracking minimizes this data loss, ensuring that ad optimization works with accurate data.
What improvement can I expect in Meta ads with Shopify CAPI?
According to Meta, advertisers who use the Conversions API alongside the pixel see a 13% lower cost per acquisition on average than those using the pixel alone. Results vary based on the share of iOS devices and the target audience.
Is it against KVKK to use CAPI without a cookie banner on Shopify?
Yes. Although CAPI bypasses the user's browser, the IP address and user data processed on the server side are personal data under KVKK. Sending this data to Meta without user consent creates risk under KVKK and GDPR.
Is Shopify Customer Privacy API free?
Yes, it's available for free on all Shopify plans. Advanced reporting, category-based management and audit logging require a third-party consent management platform.
How do I enable event deduplication on Shopify?
Client-side and server-side events must be sent with the same event_id value. Shopify Web Pixels provides this ID with Checkout.token or a randomly generated UUID. Check deduplication in the event details in Events Manager, where browser and server events with the same event_id are merged into a single event. Event Match Quality, on the other hand, shows how well the customer information you send is matched.
How much does a server for Shopify sGTM cost?
Google's recommended Cloud Run setup costs about $45 per server per month; since at least two servers are recommended for live traffic, budget from around $90 per month. Managed services such as Stape.io offer a free starter plan, with paid plans starting at $20 per month (500,000 requests), and are simpler alternatives to set up. As traffic grows, so does the cost.
Conclusion
In Shopify, server-side tracking is no longer an optional improvement, but a basic requirement for healthy ad measurement. Setting up Meta CAPI and Google sGTM together with proper consent management improves data quality and meets KVKK and GDPR obligations.
This tracking setup works hand in hand with cookie consent and KVKK/İYS compliance; we cover consent management separately in our cookie policy guide. The native Shopify tracking method that runs in a sandbox is explained in our Custom Pixel guide.
To set up server-side tracking and consent infrastructure properly on your Shopify store, let's design your tracking architecture together through our integration service.




