Removing Google Properties from your Shopify theme
This article provides step-by-step guide to Google tags such as Google Tag Manager, Google Analytics and/or Google Adwords from your Shopify theme.liquid file and how to add them inside our app to load them properly for better compliance. Also, this method makes your theme.liquid file cleaner.
You should avoid loading Google properties directly from the theme for improved compliance and smoother tag management.liquid file. Instead, you can leverage the Pandectes GDPR Compliance app to manage your Google tags, ensuring they load only after user consent.
Go to your Shopify Admin , select Online Store , and then click on Themes . Under your live theme, click Actions and select Edit Code .
In the code editor, find theme.liquid under the Layout folder.
Copy the Google Tag IDs (GTM-XXXXXXX and/or G-XXXXXXX and/or AW-XXXXXXX) and then delete Google Snippets in your theme.liquid file. This ensures that the Google tags will no longer load directly from your theme.
Click the Save button to apply your changes.
If your store uses a Universal Analytics (UA-) property, remove the script from your theme.liquid file. Leaving the UA property in your theme.liquid may create problems as this is no more supported by Google.
Go to Pandectes GDPR Compliance App . Navigate to Settings > Integrations . Choose Google Consent Advanced Mode V2 .
In the Google Properties section, check the boxes for each tag you’re using (e.g., Google Analytics, Google Ads, or GTM). Enter their IDs (e.g., AW-XXXX, GTM-XXXX) in the corresponding fields.
By following these steps, your Google properties will now be managed through the Pandectes GDPR Compliance app. This ensures that tags are only loaded after obtaining user consent, keeping your store compliant and improving the browsing experience for your customers. Refer to the accompanying screenshots for more guidance.
Introduction
You should avoid loading Google properties directly from the theme for improved compliance and smoother tag management.liquid file. Instead, you can leverage the Pandectes GDPR Compliance app to manage your Google tags, ensuring they load only after user consent.
Remove tags from your theme
Go to your Shopify Admin , select Online Store , and then click on Themes . Under your live theme, click Actions and select Edit Code .
In the code editor, find theme.liquid under the Layout folder.
Copy the Google Tag IDs (GTM-XXXXXXX and/or G-XXXXXXX and/or AW-XXXXXXX) and then delete Google Snippets in your theme.liquid file. This ensures that the Google tags will no longer load directly from your theme.
Click the Save button to apply your changes.
If your store uses a Universal Analytics (UA-) property, remove the script from your theme.liquid file. Leaving the UA property in your theme.liquid may create problems as this is no more supported by Google.
Add tags inside Pandectes GDPR Compliance
Go to Pandectes GDPR Compliance App . Navigate to Settings > Integrations . Choose Google Consent Advanced Mode V2 .
In the Google Properties section, check the boxes for each tag you’re using (e.g., Google Analytics, Google Ads, or GTM). Enter their IDs (e.g., AW-XXXX, GTM-XXXX) in the corresponding fields.
Conclusion
By following these steps, your Google properties will now be managed through the Pandectes GDPR Compliance app. This ensures that tags are only loaded after obtaining user consent, keeping your store compliant and improving the browsing experience for your customers. Refer to the accompanying screenshots for more guidance.
Updated on: 19/12/2024
Thank you!