Built for Shopify & WooCommerce · Tracking checked every 30 minutes.

GA4 Shopify setup with server-side tracking, step by step

Abir Molla
Abir MollaNov 30, 2026 · 7 min read
GA4 Shopify setup with server-side tracking, step by stepVideo · 9:51 · plays from YouTube

If GA4 shows fewer purchases than your Shopify admin, send each sale to GA4 from your own tracking server, not only from the shopper's browser. This guide is the GA4 Shopify setup with KiteTrack, in the same order as the video above, with a screenshot for each step that people usually ask about.

The whole setup takes about 10 minutes in the video, and you don't write any code. If you run ads too, the same first steps set up Meta and Google Ads.

Not sure how many purchases GA4 is missing today? Run the free Tracking Check first. It takes about two minutes.

Why GA4 misses Shopify purchases

The GA4 tag runs in the shopper's browser. Ad blockers, privacy settings and a thank-you page that closes too fast can stop it before the purchase reaches GA4. Shopify still has the order, so the numbers drift apart, and every GA4 report works from part of your sales.

A tracking server on your own subdomain adds a second, steadier path. The browser hands the purchase to your server, and the server sends it to GA4. Our guide on why GA4 revenue doesn't match Shopify explains which part of the gap this fixes and which part is normal.

What you need before you start

  • A KiteTrack account and access to your Shopify admin.
  • A Google Tag Manager web container and server container. Our guide on creating your Tag Manager containers shows how.
  • Access to the DNS settings where you bought your domain.
  • A GA4 property with a web data stream for your store, and Editor access to it.

GA4 Shopify setup in KiteTrack: the 9 steps

Step 1: connect Google Tag Manager (0:28)

On the KiteTrack dashboard, click Continue setup, choose E-commerce, then Shopify.

KiteTrack asks for two things from Tag Manager:

  • The server container configuration. In your server container, click the container ID, choose Manually provision tagging server, and copy the container config.
  • Your web container ID. It looks like GTM-ABC1234.

Then pick the server location closest to most of your customers and click Connect. Creating the server takes a moment.

KiteTrack's Connect your Google Tag Manager step, with the server container configuration, the web container ID and the server location list
Paste the server container config and web container ID, then pick the server location closest to your customers.

Step 2: add your tracking subdomain and two CNAME records (1:24)

Choose a subdomain on your own domain for the tracking server. Any name works; the video uses sfgtm.yourstore.com. Running it on your own domain is what makes it first-party for the browser.

KiteTrack then shows two CNAME records. Add both in the DNS settings where you bought your domain, then click Check now. Verification can take a little while. When it passes, both records show Verified.

KiteTrack's Add your tracking domain step showing Subdomain verified, with both CNAME records marked Verified and the tagging server URL
Both CNAME records verified. Keep them in place: removing one stops tracking.

Step 3: install the Shopify app (2:28)

Go to Install on your site. KiteTrack links you to the Stape Conversion Tracking app in the Shopify App Store. Install it, then open Inject GTM in the app:

  1. Tick Inject web GTM container to store pages and paste your web container ID.
  2. Tick Add custom domain and paste the container loading path from KiteTrack.
  3. Tick Add custom loader and paste the container identifier from KiteTrack.
  4. Turn on Cookie Keeper and click Save.
The Inject GTM settings in the Shopify app: web container ID, custom domain and custom loader filled in
The three values come from KiteTrack's Install on your site step.

Step 4: add the data layer and custom pixel (3:15)

Shopify's checkout and thank-you pages don't run your theme code, so the purchase has to come from a custom pixel under Settings → Customer events.

  1. In the app's Data layer tab, turn on Add e-commerce data layer events, Add suffix to event names and Track checkout events, then copy the code.
  2. In Shopify, click Add custom pixel, give it a name and click Add pixel.
  3. Delete the code that's already there and paste the code you copied.
The Data layer tab in the Shopify app with all three options ticked and the code to copy
All three options on. The code at the bottom goes into the custom pixel.
  1. Set the customer privacy options, click Save, then Connect.

In the video, Permission is Not required and Data sale is Data collected does not qualify as data sale. Shopify describes "Not required" as the choice when you don't want the pixel to wait for customer permission (Shopify Help Center, managing custom pixels). If you sell where you need consent first, such as the EU or UK, check this against your privacy policy and choose the consent option in Step 5.

Shopify custom pixel privacy settings with Permission set to Not required and Data sale set to does not qualify as data sale
The privacy settings used in the video. Stores that need consent first should check theirs.

Step 5: add your GA4 measurement ID (4:28)

Back in KiteTrack, click I've installed it, choose GA4 and click Continue.

To find the measurement ID, Google's steps are: in Admin, under Data collection and modification, click Data streams (Analytics Help, measurement ID). Open your web stream and copy the ID that starts with G-.

GA4 Web stream details with the stream URL, stream ID and the measurement ID starting with G-
The measurement ID sits on the right of the web stream details.

Paste it into KiteTrack and click Next. KiteTrack then asks about a cookie banner. The video picks No; if your store shows one, pick Yes. Click Generate my files and Download ZIP (5:03).

The next step, Connect ad accounts, is optional. You can skip it and come back later.

Step 6: import both files into Tag Manager (5:40)

The ZIP has two files, one for each container.

Web container: open Admin → Import container, choose the web file, keep the Default Workspace, choose Merge, and click Add to workspace. Then click Submit and Publish. You can keep the version name Tag Manager fills in.

Tag Manager's Import Container screen with the web file chosen, the Default Workspace, and Merge selected
Choose Merge, not Overwrite, so your existing tags stay.

Server container (6:38): do the same with the server file, then submit and publish.

Google explains the difference: Overwrite removes your existing tags, triggers and variables, while Merge keeps your existing tags, triggers and variables and lets you choose to overwrite or rename the ones that clash (Tag Manager Help, container export and import). Merge is the safe choice if your containers already have tags.

Step 7: add the server URL and preview (7:07)

In the server container, open Admin → Container settings, click Add URL, paste the tagging server URL from KiteTrack's Tracking domain page, and save.

Then click Preview in the server container. If your DNS is verified, the preview opens. Preview the web container too: enter your store's URL and click Connect.

KiteTrack's Send a test purchase step with the tagging server URL to copy and the test listener waiting for GA4
Copy the tagging server URL from here. The test listener turns green when GA4 gets the purchase.

Step 8: make a test purchase (7:48)

View a product, add it to the cart, click Buy it now, fill in the checkout and click Pay now. In the video, KiteTrack showed Setup complete as soon as the order went through (8:14).

Step 9: check the purchase in GA4 real-time (8:34)

In GA4, open Reports → Realtime. Google says the Realtime report shows activity from the last 30 minutes (Analytics Help, Realtime report). Look for purchase under key events, then click the event and check its value. In the video it showed 25, the same total as the order.

GA4 Realtime overview with one purchase under Key events by Event name
The test purchase in GA4 Realtime, under key events.

Your standard GA4 reports take longer. Google says data processing can take 24 to 48 hours, and numbers may change during that time (Analytics Help, data freshness). Realtime is the place to check today.

What you'll see in the KiteTrack dashboard

After the test order, the KiteTrack overview shows (9:04):

  • The purchase, the revenue tracked ($25.00 in the video) and add to carts.
  • GA4 under Platforms, with the events it received.
  • The purchase funnel: page views, product views, add to carts, checkouts started and purchases.
  • Live events, each with its delivery status.
KiteTrack overview after the test order: 1 purchase, $25.00 revenue tracked, purchases per day and GA4 under Platforms
The test order in KiteTrack: purchase, revenue and GA4's events.

KiteTrack keeps checking every 30 minutes. If purchases stop reaching GA4, you get an alert, instead of finding out from a month of wrong reports.

Common mistakes

  • Two GA4 setups at once. If Shopify's Google & YouTube app or a theme snippet also sends purchases to the same GA4 property, each sale can count twice. Keep one source of purchases.
  • Choosing Overwrite in the import. It replaces your workspace. Choose Merge.
  • Forgetting to publish. Imported files do nothing until you click Submit and Publish in both containers.
  • Checking standard reports too soon. Use Realtime for the test order; the other reports can take 24 to 48 hours.

FAQ

How long does the GA4 Shopify setup take?

About 10 minutes in the video. DNS verification can take longer, depending on your domain provider.

Where do I find my GA4 measurement ID?

In GA4, go to Admin, then Data collection and modification, then Data streams. Open your web stream; the ID starts with G-. Our guide on finding your GA4 measurement ID has more detail.

Why doesn't my test purchase show in GA4 reports yet?

Standard reports can take 24 to 48 hours. Check the Realtime report instead, which shows the last 30 minutes.

Do I need a server container for GA4 on Shopify?

Not for basic GA4, but without one every purchase depends on the shopper's browser. The server container is what lets a blocked or interrupted browser tag still get the sale to GA4.

Where KiteTrack fits

KiteTrack sets up GA4 for your Shopify store from a tracking server on your own subdomain, then checks every 30 minutes that purchases still reach GA4. See GA4 server-side tracking for Shopify or start with the free Tracking Check. If you get stuck at any step, email support@kitetrack.io and we'll help you finish.

Sources

Get tracking tips by email

Short, practical fixes for Meta, Google Ads and GA4, from Abir.

You’re in. First tip lands soon.

Abir Molla
Written by Abir Molla

Tracking specialist. He builds and runs KiteTrack, and explains tracking on YouTube.

Keep reading

Let your ads see every sale.

30-day money-back guarantee · free migration · cancel any time