← All Guides

Shopify Google Ads Tracking: Browser-Side vs Server-Side, and How to Run Both Without Double Counting

What Shopify stores lose with browser-only Google Ads conversion tracking, how server-side tracking through a server GTM container and Shopify webhooks recovers it, and the deduplication setup that lets you run both together safely.

Atiqul Islam
Written by Atiqul Islam

Tracking & analytics specialist. 278+ GTM, GA4 and server-side tracking projects for clients in the US, UK and Australia.

Rather not do this yourself? I set this up for clients every week. Free 15-minute audit, no obligation.

Book a Free Audit

A Shopify store owner showed me a Google Ads account reporting 212 purchases in a month. The Shopify admin showed 287 orders, and roughly two thirds of traffic came from Google Ads. Nothing was broken in the usual sense; the browser tag fired perfectly on every thank-you page it was allowed to load. The missing orders were customers on Safari, customers who declined cookies, customers with ad blockers and customers who closed the tab before the thank-you page finished loading.

This guide explains the difference between browser-side and server-side Google Ads tracking on Shopify, why the gap exists, and how to run both together with deduplication so the account sees every order exactly once.

How Browser-Side Tracking Works

  1. The customer clicks an ad and lands on the store with a Google click ID in the URL.
  2. The Conversion Linker stores that ID in a first-party cookie.
  3. On the thank-you page, the Google Ads conversion tag fires from the browser with order value, currency and transaction ID.
  4. Google matches the conversion to the click using the cookie.

It is simple, fast and fully handled in Google Tag Manager. The Shopify GA4 tracking guide on this site covers the setup, including the Customer Events pixel that makes it work on modern checkout.

Where Browser-Side Loses Orders

None of these are configuration errors. They are limits of running measurement in the customer's browser.

How Server-Side Tracking Works

  1. The customer places an order.
  2. Shopify sends an orders/paid webhook to your server-side GTM container the moment payment is confirmed.
  3. The server container turns the order into a conversion event with the stored click ID, value, currency and transaction ID.
  4. It sends the conversion to Google Ads from your server.

The browser is not involved after the order, so blockers, closed tabs and dropped requests do not matter. The server also sees the order's final value after discounts and currency conversion, directly from Shopify.

The Setup, Step by Step

Step 1: Capture the click ID on the storefront

In GTM on the storefront, store the gclid URL parameter in a first-party cookie for 90 days, along with the GA4 client ID. Then write both to the Shopify cart as attributes using the Cart API, for example attributes[gclid], so they travel with the order. A small Custom HTML tag that calls /cart/update.js after the cookie is set handles this.

Step 2: Set up the server container

Create a server-side GTM container and host it on Google Cloud or a managed provider, on a subdomain of your store such as sgtm.yourstore.com. Add a Client that listens on a path like /shopify-orders and verifies the Shopify webhook HMAC signature.

Step 3: Create the Shopify webhook

In the Shopify admin, Settings, then Notifications, then Webhooks, add a webhook for Order payment with JSON format pointing at your server container path. Alternatively create it through a custom app for the API version you want.

Step 4: Map the order to a conversion

In the server container, parse the webhook into event data: transaction_id from the order ID, value from the total price, currency, items from line items, gclid and client_id from the note attributes, and the customer's hashed email and phone.

Step 5: Send to Google Ads

Use the Google Ads conversion tag in the server container with the conversion action you already use in the browser. Map the transaction ID, value, currency, click ID and user-provided data. Google Ads deduplicates conversions with the same transaction ID within the same action, so the browser and server events merge into one.

Step 6: Keep the browser tag

Leave the browser tag in place. It fires first for most customers and carries the full click context. The server event arrives seconds later and is deduplicated. For the customers where the browser tag never fired, the server event is the only record and it counts.

Deduplication Rules

If you see conversions roughly doubling after adding server-side, one of these rules is broken.

Testing

  1. Place a test order with the browser tag working. Confirm the browser conversion fires in GTM Preview and the webhook arrives in the server container Preview with the correct order ID, value and click ID.
  2. Place a second test order with an ad blocker enabled. Confirm the browser tag does not fire and the server event still arrives.
  3. After 24 hours, check Google Ads for exactly two conversions, not three or four.
  4. Over a week, compare Google Ads conversions with Shopify orders attributed to Google in the Shopify marketing report. The gap should shrink to single digits.

What Changes in the Account

More conversions recorded means lower reported cost per acquisition and, more importantly, more signals for Smart Bidding. Target ROAS and Maximise Conversion Value strategies perform better with complete data. Stores often see bidding become noticeably more stable within two to three weeks of adding server-side conversions, simply because the algorithm is no longer learning from a biased sample of customers who happen not to use Safari.

Summary

Browser-side tracking is necessary and not sufficient on Shopify. Server-side tracking from the order webhook fills the gaps that browsers create, and with order ID deduplication the two work as one system. If your Google Ads numbers and your Shopify admin disagree by more than ten percent, this is the fix.

Frequently Asked Questions

How many conversions does browser-only tracking miss on Shopify?

It varies by audience. Stores with a lot of Safari and iOS traffic, EU visitors under consent banners, or tech-savvy customers with ad blockers commonly see 15 to 30 percent of orders missing from Google Ads compared with the Shopify admin. Server-side tracking closes most of that gap.

Is server-side tracking a replacement for the browser tag?

No. Run both. The browser tag carries the richest click context and fires instantly. The server event catches what the browser misses. Deduplicate with the order ID so Google Ads counts each order once.

What does a server-side setup cost?

A server GTM container needs hosting. Google Cloud App Engine or Cloud Run typically costs a modest monthly amount for a small store, and managed hosts such as Stape offer fixed plans. Add setup time. For a store spending four figures a month on ads, it pays back quickly.

How does the server know which ad click produced the order?

You capture the Google click ID and the GA4 client ID on the storefront and store them on the cart as attributes or in checkout metadata. The webhook includes them with the order, and the server tag sends them to Google Ads.

Does this also help Meta?

Yes. The same server container can send Meta Conversions API events from the order webhook, deduplicated against the browser pixel by event ID. Most of the infrastructure is shared.

Want This Done Right the First Time?

Book a free 15-minute audit call. I'll review your setup, show you what is broken, and tell you exactly what it takes to fix it.

Chat Now