Turn off old GA4 tracking
Connecting accounts · GA4

Turn off old GA4 tracking

Once PixelRelay sends your shopping events to GA4, anything else still sending them to the same property makes GA4 count them twice. This page shows where to switch the old sources off.

Do it in this order

Do it in one sitting. It's the same order as Guided setup → Switch & enable:

  1. Connect GA4 in PixelRelay, and finish the store check and plan approval if you haven't yet.
  2. Under Switch over Google Analytics, turn off each old source below (or check you don't use it) and click Mark as done.
  3. Click Enable Google Analytics tracking right away. Leaving both on counts sales twice, and a long gap misses sales.
  4. Watch Event status on the same screen for the first event, then check it shows up in GA4's Realtime report.
  5. If the store check still finds old tracking on your storefront, remove it and click Check my store again.

Try not to switch in the middle of a big sale or campaign push.

What to remove is your old GA4 setup: the Google & YouTube app's GA4 connection, GTM tags, custom pixels and theme code. PixelRelay loads its own GA4 tag through the PixelRelay Pixel app embed, so you don't need another one. Leave that app embed on, and leave the PixelRelay app pixel and PixelRelay Checkout Tag alone. PixelRelay's tag isn't in your theme code, so anything you find there with your G- ID is from your old setup.

Google & YouTube app

  1. In Shopify, go to Sales channels → Google & YouTube → Settings.
  2. Open Connected Google services and find Google Analytics.
  3. Click Disconnect, then Disconnect again to confirm.

This only disconnects GA4. Your product feed and Google Ads stay connected. If PixelRelay handles Google Ads too, also switch off the channel's Google Ads events (Google Ads steps).

Google Tag Manager

  1. In Google Tag Manager, open your store's container and click Tags.
  2. Open each of these and pause it (⋮ menu at the top right → Pause → Save):
    • Google Tag tags whose Tag ID is your G- Measurement ID (older containers may call it Google Analytics: GA4 Configuration)
    • Google Analytics: GA4 Event tags
  3. Click Submit, then Publish. Paused tags keep running until you publish.

Leave the GTM container itself installed, since it may run other things. Using a server container (server-side GTM, for example on Stape)? Pause its GA4 tags too and publish that container.

Custom pixels

  1. In Shopify, go to Settings → Customer events. Custom pixels and app pixels are in the same list.
  2. Click … → Disconnect on any custom pixel that sends to GA4. Its code usually mentions G-, gtag or googletagmanager. Disconnecting doesn't delete it.

Theme code

  1. Make a backup first: Online Store → Themes, click … next to your current theme, then Duplicate.
  2. On the same … menu, click Edit code.
  3. Open layout/theme.liquid. Click into the code and search (Ctrl+F, or Cmd+F on a Mac) for G- and gtag(. Also look in the snippets folder for files with names like google, gtag or analytics.

You're looking for something like this:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-ABC123DEF4"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-ABC123DEF4');
</script>

Or events like gtag('event', 'add_to_cart', { ... }).

  1. Delete it, or wrap it in {% comment %} and {% endcomment %} so it stops running. If the same block also has an AW- line and you haven't moved Google Ads to PixelRelay, remove only the G- lines and the GA4 events.
  2. Click Save.

Found a GTM- snippet? Leave it and pause the tags inside GTM instead (see above). Not sure what a snippet does, or a developer added it? Ask them before you delete anything.

Other tracking apps

If an app like Elevar, Littledata or Analyzify sends events to GA4 for you, turn off GA4 in that app. Keep the app if it does other jobs.

Check again

In Guided setup, if PixelRelay's last store check still found a Google Analytics tag, click Check my store again after you've removed it. The check can't see anything inside Shopify's Customer events, so the Google & YouTube step above still matters even if it comes back clean.

Switch back

  • Google & YouTube: reconnect the property under Connected Google services.
  • GTM: open each tag, ⋮ → Unpause, then Submit and Publish.
  • Custom pixels: in Settings → Customer events, click … → Connect on the pixel.
  • Theme: publish your duplicate, or put the code back.
  • PixelRelay: set Google Analytics 4 to My existing setup (PixelRelay sends nothing) in Settings → Relay → Who tracks each network?, or disconnect it in Connections.

Do both, so you don't end up with two senders, or none.

Need help? Email [email protected]