Articles on: Integrations
This article is also available in:

Removing Google Properties from your Shopify theme

Overview


This article shows how to remove Google Tag Manager, Google Analytics, and Google Ads snippets from your theme's theme.liquid file and load the same tags through the Pandectes Google Consent Mode integration instead.


When Pandectes loads your Google tags, it sets the Google consent defaults first, so every tag starts with the visitor's consent state. It also keeps theme.liquid cleaner and avoids loading the same tag twice.


If you manage your Google tags inside Google Tag Manager, read How to set up Google Tag Manager with Pandectes first. It explains when to keep GTM in your theme and when to let Pandectes load it.


Remove the tags from your theme


  1. In Shopify Admin, go to Online Store > Themes. Next to your live theme, click the ... button and select Edit code.
  2. Open theme.liquid in the Layout folder.
  3. Find the Google snippets. Search for GTM-, G-, and AW-. Copy each ID somewhere safe (for example GTM-AB12CD3, G-1A2B3C4D5E, AW-123456789).
  4. Delete the snippets, then click Save.


If you still find a Universal Analytics snippet (an ID that starts with UA-), delete it too. Google no longer supports Universal Analytics.


Add the tags in Pandectes


  1. In Shopify Admin, go to Apps > Pandectes GDPR > Integrations. On the Google Consent Mode card, click Configure.


Configure button on the Google Consent Mode card


  1. Turn on the Google Consent Mode toggle at the top of the page.


Google Consent Mode toggle


  1. Under Configuration, paste the IDs you copied:
    • Google Tag Manager ID for GTM- IDs
    • Google Analytics ID for G- or GT- IDs
    • Google Ads ID for AW- IDs


Separate several IDs in one field with commas.


Google Tag Manager ID, Google Analytics ID and Google Ads ID fields


  1. Click Save.


What happens next


Pandectes now loads the tags you entered and sends Google the visitor's consent. By default the integration runs in Advanced mode: tags load with consent set to denied and only send cookieless pings until the visitor accepts. To hold the tags back completely until consent, select Run in basic mode - Tags load after consent under Advanced settings. Both options are explained in Using Google Consent Mode Integration.

Updated on: 27/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!