Resolving Common Google Tag Manager Integration Issues with Complianz
Content
Integrating Google Tag Manager (GTM) with the Complianz – GDPR/CCPA Cookie Consent plugin is a powerful way to manage tracking scripts in a compliant manner. However, users often encounter specific configuration challenges. This guide addresses the most common issues and provides clear solutions based on community discussions.
1. The GTM ID Input Field is Missing in the Wizard
Problem: You navigate to the Complianz wizard under Consent > Statistics Configuration but cannot find the field to enter your Google Tag Manager Container ID.
Why it happens: This occurs almost exclusively when another plugin that manages GTM or Google Analytics is active, such as GTM4WP or Google Site Kit. Complianz detects these integrations and automatically hides its own GTM field to prevent conflicts and duplicate code.
Solution: You have two options:
- Option A: Use the Third-Party Plugin's GTM Field. If you have GTM4WP installed, you can enter your GTM ID there. Ensure the "Container Code On/OFF" setting in GTM4WP is set to "On" so it outputs the container code on your site. Complianz will still work with it to manage consent.
- Option B: Disable the Integration. If you prefer to use Complianz's native GTM implementation, go to Complianz > Integrations > Plugins and disable the integration for "Google Tag Manager for WordPress" or "Google Site Kit." This will make the GTM ID field reappear in the Complianz wizard.
2. GTM Code is Placed in the Footer (Tag Diagnostics Warning)
Problem: Tools like Google's Tag Assistant report a warning: "Your tag may be installed too low in the page" or "GTM JavaScript code not found as a direct child of the tag."
Why it happens: By default, Complianz places the GTM code in the website's footer for performance and compatibility reasons. It also omits the part, as it is not needed for the plugin's functionality. While this is not an error that breaks data collection, it is a warning from Google.
Solution: The Complianz team has acknowledged this feedback. For users who require the code in the , a fix is reportedly in development for a future update. In the meantime, you can use the GTM4WP plugin to handle the container code placement, which will place it in the by default.
3. Tags Fire Before Consent is Given
Problem: Your GA4 or other marketing tags are firing and placing cookies even before a user has given their consent, which violates compliance principles.
Why it happens: This is almost always due to an incomplete configuration in Google Tag Manager itself. Simply importing a container or adding a tag is not enough; each tag must have the correct consent triggers attached to it.
Solution: You must configure the triggers for every tag in your GTM container. The definitive guide from Complianz provides a JSON template you can import. For a tag to fire only after consent for "Statistics" is given, its trigger should be "Custom Event" where the "Event name" equals cmplz_event_statistics. To block a tag from firing if consent is denied, you must add an exception to its trigger where the "Event name" equals cmplz_event_statistics. Ensure you have followed all steps in the definitive guide to Tag Manager and Complianz.
4. Errors When Importing the GTM JSON Template
Problem: You download the `demo_complianz_tag_manager.json_.zip` file from the guide but get an error when trying to import it into GTM.
Why it happens: The file is compressed. Google Tag Manager requires a `.json` file for import, not a `.zip` archive.
Solution: Before importing, you must first unzip the downloaded file on your computer. This will extract the actual `demo_complianz_tag_manager.json` file, which you can then successfully import into your GTM container.
By methodically working through these common pitfalls, you can achieve a robust and compliant integration between Google Tag Manager and the Complianz plugin. Always remember to clear your site and browser cache after making changes to see the results.
Related Support Threads Support
-
Ga4 via GTM fires before consenthttps://wordpress.org/support/topic/ga4-via-gtm-fires-before-consent/
-
GTM triggers and Complianzhttps://wordpress.org/support/topic/gtm-triggers-and-complianz/
-
Goals created in Google Ads and added with Google Tag Manager.https://wordpress.org/support/topic/goals-created-in-google-ads-and-added-with-google-tag-manager/
-
GTM Tag only added in body, not head?https://wordpress.org/support/topic/gtm-tag-only-added-in-body-not-head/
-
Google Tag Managerhttps://wordpress.org/support/topic/google-tag-manager-75/
-
GTM: an exception for statistics cookies (category)https://wordpress.org/support/topic/gtm-an-exception-for-statistics-cookies-category/
-
What tags are tracked on my site?https://wordpress.org/support/topic/what-tags-are-tracked-on-my-site/
-
GTM4WP / Complianz integrationhttps://wordpress.org/support/topic/gtm4wp-complianz-integration/
-
Complianz – Ga4 custom eventshttps://wordpress.org/support/topic/complianz-ga4-custom-events/
-
GTM – KIT SITE – ANALYTICShttps://wordpress.org/support/topic/gtm-kit-site-analytics/
-
GTM customvariableshttps://wordpress.org/support/topic/gtm-customvariables/
-
What happens if i want to use gtag and a GTM tag throught the plugin?https://wordpress.org/support/topic/what-happens-if-i-want-to-use-gtag-and-a-gtm-tag-throught-the-plugin/
-
GTM Container IDhttps://wordpress.org/support/topic/gtm-container-id/
-
GTM in bodyhttps://wordpress.org/support/topic/gtm-in-body/
-
Updates related to New Tag Diagnosticshttps://wordpress.org/support/topic/updates-related-to-new-tag-diagnostics/
-
Your tag may be installed too low in the page, which can impact performancehttps://wordpress.org/support/topic/your-tag-may-be-installed-too-low-in-the-page-which-can-impact-performance/
-
Complianz GTM trigger file errorhttps://wordpress.org/support/topic/complianz-gtm-trigger-files-error/
-
Does Complianz insert GTM code on site? And what does cookie and script blocker?https://wordpress.org/support/topic/does-complianz-insert-gtm-code-on-site-and-what-does-cookie-and-script-blocker/
-
GTM import giving errorshttps://wordpress.org/support/topic/gtm-import-giving-errors/
-
Missing GTM in Order Received Pagehttps://wordpress.org/support/topic/missing-gtm-in-order-received-page/
-
Setting up Complianz, Google Tag Manager and GTM4WPhttps://wordpress.org/support/topic/setting-up-complianz-google-tag-manager-and-gtm4wp/
-
Default voor GTM ingeladenhttps://wordpress.org/support/topic/default-voor-gtm-ingeladen/
-
Google Tag Manager always loaded?https://wordpress.org/support/topic/google-tag-manager-always-loaded/
-
GA 4 Marketinghttps://wordpress.org/support/topic/ga-4-marketing/
-
Google Tag Manager Errorshttps://wordpress.org/support/topic/google-tag-manager-errors/
-
No option to add GTM IDhttps://wordpress.org/support/topic/no-option-to-add-gtm-id/
-
GTM4WP errorshttps://wordpress.org/support/topic/gtm4wp-errors/
-
GA4 Container Google tag managerhttps://wordpress.org/support/topic/ga4-container-google-tag-manager/
-
Can’t enter the GTM container IDhttps://wordpress.org/support/topic/cant-enter-the-gtm-container-id/
-
Events not being sent to GA4 from GTM After Installationhttps://wordpress.org/support/topic/events-not-being-sent-to-ga4-from-gtm-after-installation/
-
session_starthttps://wordpress.org/support/topic/session_start-4/