Logo of TAGGRS, written in blue and with a small favicon
HomeServer-side TrackingMeta CAPI GatewayJoin the competition
SERVER-SIDE TRACKING
Get started
Get started with TAGGRSSet up Google Tag ManagerAdd the GTM Data LayerConfigure GTM transformationsTest the setupDebuggingAnalytics dashboard
Migrate from Google CloudMigrate from hosting
Shortcuts
GTM Copy PasteReady-made templates
GA4 Server-side Tracking
Setup in GTMCreate GA4 Event TagsGA4 tag setup in server containerE-commerce events in GTM
Google Ads Server-side Tracking
Install Conversion LinkerSet up Conversion TrackingConfigure Enhanced ConversionsDeploy Remarketing TagsInstall Offline Conversions
Facebook Server-side Tracking
Set Meta PixelImprove your EMQ ScoreInstall Meta CAPIMeta Events Deduplication
LinkedIn Server-side Tracking
Install LinkedIn Insight TagSet up LinkedIn CAPILinkedIn Events Deduplication
TikTok Server-side Tracking
Set up TikTok PixelInstall TikTok Events APITikTok Events Deduplication
Pinterest Server-side Tracking
Set up Pinterest TagConfigure Pinterest Conversions APIPinterest Events Deduplication
Snapchat Server-side Tracking
Set up Snap PixelSnapchat Conversions APISnapchat Events Deduplication
TAGGRS Tracking Tags and Tools
Tracking TagsGoogle Service Account integrationsGTM LogsProfit TrackingData Enricher ToolWebhooks TesterEnhanced Tracking ScriptMulti Domain ToolClick ID RecoveryConsent Tool
Configurations
Billy Grace Server-side TrackingLeadPages Server-side TrackingPiwik PRO Server-side TrackingCDN Server-side TrackingShopify Server-side TrackingActiveCampaign Server-side TrackingKlaviyo Server-side TrackingSpectacle Server-side TrackingEulerian Server-side Tracking
Server-side Tracking for e-commerce
Shopify Data LayerShopware Data LayerMagento Data LayerWooCommerce Data LayerPrestashop Data LayerLightspeed Data Layer
Consent Management server-side
Activate Consent ModeConfigure AxeptioConfigure Cookie Confirm
META CAPI GATEWAY
ACCOUNT SETTINGS
User roles and access

Configure Shopify Server-side Tracking

In this guide, you'll find a comprehensive walkthrough for implementing server-side tracking on your Shopify store using TAGGRS and Google Tag Manager (GTM). Designed for developers and technical teams, it enables you to collect more accurate first-party data, ensure GDPR compliance, improve site performance, resist ad blockers, and benefit from extended cookie lifespans.

Prerequisites

  • A Google Analytics 4 account linked to your GTM account.
  • A functioning Shopify Data Layer on your website.

    Check out our guide to set up a Data Layer in Shopify.

  • A TAGGRS account and server container.

    You can register for free.

  • TAGGRS-managed hosting for your server container.

Set up your Shopify data layer

  1. Install the TAGGRS Shopify Data Layer App from the Shopify App Store for seamless, GA4-compatible event tracking.
  2. Ensure key ecommerce events (product views, add-to-cart, purchases) are pushed to the data layer.

Create and configure your TAGGRS account

  1. Sign up at TAGGRS and create a new server container.
  2. Update your DNS settings to point your chosen subdomain (e.g., sst.yourdomain.com) to TAGGRS, following the dashboard instructions.

Prepare Google Tag Manager containers

  1. In GTM, create both a web and a server container.
  2. Link your GA4 property to the web container.
  3. In the TAGGRS dashboard, download the Shopify server-side tracking template (JSON files) for both containers.

Import templates into GTM

  1. Import the web container template into your GTM web container.
  2. Import the server container template into your GTM server container.
  3. Pause or remove any unnecessary tags to avoid conflicts (e.g., legacy Facebook Pixel tags if you’re now using the Conversion API).

Configure variables and platform integrations

  1. In GTM, add required variables (e.g., TAGGRS Container ID, platform-specific IDs).
  2. Set up tags and triggers for platforms such as GA4, Google Ads, Meta CAPI, etc.
  3. For advanced use cases, add profit tracking or other TAGGRS tools as needed.

Test and debug your setup

  1. Use GTM Preview mode for both containers.
  2. Add your server container subdomain to the list of container URLs in the server container settings.
  3. Perform test actions (e.g., add_to_cart, purchase) and confirm events are received in both GTM and your analytics dashboards.
  4. Check for correct event deduplication and data flow.

Troubleshooting common issues

Even with a correct setup, Shopify Server-side Tracking can sometimes behave unexpectedly. Below are the most common issues and how to resolve them.

1. Purchase or begin_checkout events not firing

Problem: Purchase or checkout events do not trigger as expected.
Solution: Check your Customer Events Pixel settings in Shopify:

1. Go to Shopify Admin → Settings → Customer Privacy
2. Set the privacy setting to Not Required

When this setting is Required, Shopify blocks the code needed to fire ecommerce events.

2. Server container preview stops for checkout and purchase events

Problem: begin_checkout or purchase events do not appear in the server-side preview.
Solution: 
1. Fully close the Client-side GTM Preview
2. Open only the Server-side Preview in one browser tab
3. Open your Shopify store in a separate tab
4. Refresh the store page and look for a page_view event in the server preview
5. Ensure both containers are published before testing
6. Having both previews open can interfere with event forwarding.

3. Meta or Pinterest shopping feed breaks after pixel removal

Problem: Your product feed for Meta (Facebook) or Pinterest stops working after disconnecting their pixels in Shopify.
Solution: 
1. Create a dummy pixel in Meta or Pinterest
2. Connect this dummy pixel to the Shopify app
3. Keep your main pixel connected via the Server-Side Container.

This allows the Shopping Feed to remain linked while all real tracking runs server-side.

4. No events appear in Server Preview Mode

Issue: No events show up in the server-side preview despite a correct setup.
Solution: The Google & YouTube app in Shopify may override Server-side Tracking.

1. Go to Shopify Admin → Apps → Google & YouTube.
2. Disconnect Google Analytics 4 from this app.

This app often sends events directly to Google, bypassing your server container.

5. Shopify Analytics decrease after Consent Mode and SST

Problem: Shopify or GA4 reports drop after enabling Consent Mode v2 with Server-side Tracking.
Solution: 
1. Integrate Consent Mode v2 with Shopify cookies
2. Cookiebot currently offers the most reliable Shopify integration
3. Follow Cookiebot’s Shopify installation guide
4. Complete all steps under Enabling the Customer Privacy API, except Step 6.

A correct Consent Mode setup allows GA4 to model conversions and preserve insights even without full cookie consent.

6. Page location doesn’t match real locations Shopify checkout

Problem: When using client-side pageview triggers based on checkout URLs (for example /checkout), Shopify may generate dynamic checkout URLs. As a result, the page_location sent to GA4 does not reflect the real checkout URL.
Instead of a clean URL such as:

https://example.com/checkouts/ cn/.../information?locale=en

GA4 may receive a URL similar to:

https://example.com/wpm@xxxx/custom/ web-pixel-xxxx/sandbox/modern/ checkouts/...

This makes checkout tracking unreliable and can break: page-based triggers, funnel analysis, and checkout step reporting in GA4.
It usually happens because Shopify’s web pixel sandbox dynamically rewrites checkout URLs. If you rely on the default page_location, GA4 receives the sandboxed URL instead of the real checkout path.

Solution: You can fix this by cleaning the checkout URL in Google Tag Manager before it is sent to GA4.
‍
1. Create a Custom JavaScript Variable in GTM
2. Go to your GTM web container
3. Navigate to Variables → New → Custom JavaScript and paste the following code:

function() { var currentUrl = window.location.href; var sandboxPattern = /\/wpm@[a-zA-Z0-9]+\/custom\/web-pixel-\d+@ [a-zA-Z0-9]+\/sandbox\/modern/; if (sandboxPattern.test(currentUrl)) { return currentUrl.replace(sandboxPattern, ''); } else { return currentUrl; } }

4. Name the variable (e.g. Page Location – Clean) and save it.
5. Override page_location in Your GA4 Tag by opening your GA4 configuration tag in GTM, going to Fields to Set, adding a new field:

‍Field Name: page_location
‍
Value: {{Page Location – Clean}}

‍
Save the tag and publish your web container.

6. Navigate through the Shopify checkout, inspect the GA4 request, confirm that page_location now shows a clean and consistent checkout URL.

This approach removes Shopify’s sandbox path before the hit is sent to GA4, ensuring:
• accurate checkout URLs
• reliable page-based triggers
• consistent GA4 funnel and checkout reporting.

Advanced optimization

  • Cookie recovery & CDN integration: Use TAGGRS tools to further reduce tracking loss from browser updates (e.g., iOS 16.4) and improve data quality.
  • Profit Tracking and custom analytics: TAGGRS supports advanced tracking scenarios for deeper business insights.

    Configure Profit Tracking.

Useful resources

icon of a white thunder used by TAGGRS to visually introduce Server-side Tracking
Start for free with Server-side Tracking
icon of a white upward arrow
White silhouette of a person used as icon for the support call to action
Get expert support
icon of a white upward arrow
Previous
CDN Server-side Tracking
Next
ActiveCampaign Server-side Tracking
DOCUMENTATION V1.4
Copyright © 2026 TAGGRS. All right reserved.
TABLE OF CONTENTS
PrerequisitesSet up your Shopify data layerCreate and configure your TAGGRS accountPrepare Google Tag Manager containersImport templates into GTMConfigure variables and platform integrationsTest and debug your setupTroubleshootAdvanced optimizationUseful resources