Integration with Tagfly Google Ads, Tag Manager
Overview
This article is for Shopify merchants who use Pandectes GDPR Compliance for their cookie banner and Tagfly (Google Ads, Tag Manager) for data collection.
Tagfly makes sure that the tags in your Google Tag Manager container fire only with the right consent. Pandectes collects that consent and passes it to Google through Google Consent Mode.
1. Load the Pandectes rules script in your theme
Tagfly loads Google tags early, so the Pandectes script that sets the consent defaults has to load before them.
- In Shopify Admin, go to Online Store > Themes. Next to your live theme, click the ... button and select Edit code.

- Open
theme.liquidand paste this line right after the opening<head>tag:<script src="{{ 'pandectes-rules.js' | file_url }}"></script>
- Click Save.
More details: Integrations Setup Guide.
2. Use an opt-in consent model
Your banner must block all but strictly necessary cookies until the visitor decides. In Pandectes, open Cookie banner and check the consent model shown under Banner is enabled (for example Strict opt-in). To change it per region, follow Consent Model & Regions (New Version).
On the Legacy banner, the same choice is under Behavior > Banner type: pick Accept only, Accept/Decline, or Preferences with the strict policy.
3. Turn on Google Consent Mode
- In Shopify Admin, go to Apps > Pandectes GDPR > Integrations. On the Google Consent Mode card, click Configure.

- Turn on the Google Consent Mode toggle.

- Leave Google Tag Manager ID, Google Analytics ID, and Google Ads ID empty. Tagfly loads your tags, so Pandectes must not load them a second time. Click Save.

You are now ready to collect anonymous measurement data before consent and full data after the visitor consents.
Updated on: 27/10/2026
Thank you!
