• Resolved hamster2116

    (@hamster2116)


    Dear support, I made a tag to track ecommerce events in a shop (woocommerce). The problem is it always fires even if consent is not set for statistics.

    Plugin GTM4WP is used. In addition I added code to trigger tag manager only on consent.

    GA4 Configuration tag is fired by cmplz_event_statistics

    GA4 event tag is triggered by custom event including ecommerce variables.

    What happens is that in this set up, the GA4 Config tag is not firing without consent, but the GA4 Event tag is.

    I hope maybe you can suggest a solution or point me to the right direction. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @hamster2116,

    To setup ecommerce correctly in Complianz, you need to take some steps. We made an article for this: https://complianz.io/integrations-for-woocommerce/

    If after these steps it still does not work as expected please share your URL with us so we may take a look at it to see how we may help you further with this.

    Kind regards,

    Kim van Dijk

    Thread Starter hamster2116

    (@hamster2116)

    Hello @kimvdijk thank you for the fast reply. I’m sorry if it wasn’t clear enough but my question is about Google Tag Manager.

    I’m having an issue setting up ecommerce tracking in Google Tag Manager. The tag I created for ecommerce events is always firing even without consent.

    The article you linked is not really related to the issue

    Here is my problem:

    Plugin GTM4WP is used. In addition I added code to trigger tag manager only on consent.

    GA4 Configuration tag is fired by cmplz_event_statistics

    GA4 event tag is triggered by custom event including ecommerce variables.

    What happens is that in this set up, the GA4 Config tag is not firing without consent, but the GA4 Event tag is.

    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @hamster2116,

    You could use exceptions, as explained here;https://complianz.io/using-exceptions-in-tag-manager-based-on-consent-status/

    In the sidebar you will also find a demo container, which includes all triggers and variables you might need.

    regards Aert

    Thread Starter hamster2116

    (@hamster2116)

    @aahulsebos I added the demo content to my container. I made a custom event trigger “denied statistics” using the imported Cookie – Statistics variable and set it to contains=deny.

    Then I added an exception to my GA4 Ecommerce tag.

    In the preview the consent is set to deny on the website but the ecommerce hits are still fired, it sents hits for view_item, add to cart etc. Other tags are not firing. I must be doing something wrong here?

    Screenshot of my GA4 tag: https://snipboard.io/Qox3TW.jpg

    Custom event trigger for ecommerce: https://snipboard.io/YmISDw.jpg

    Denied statistics custom event: https://snipboard.io/pM391s.jpg

    Debugger: https://snipboard.io/c7hpeS.jpg

    By the way I use GTM4WP plugin so I’m not sure if maybe I missed some step to setup the plugin, however I did follow the instructions and added custom event triggers for the categories.

    • This reply was modified 1 year, 11 months ago by hamster2116. Reason: typo
    • This reply was modified 1 year, 11 months ago by hamster2116. Reason: added screenshot
    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @hamster2116 this threw me off;

    “Plugin GTM4WP is used. In addition I added code to trigger tag manager only on consent.”

    This means tag manager needs consent, and consent would include statistics I presume, meaning when Tag Manager loads, these events load as well if the custom ecommerce events conditions are met.

    If they fire without consent, it’s either directly from GTM4WP without your container or Tag Manager is load before consent. Is this a right assumption? Because your implementation seems correct.

    regards Aert

    Thread Starter hamster2116

    (@hamster2116)

    @aahulsebos the setup I showed in the screenshots did not work when I tested it in the preview. So I tried something else, I added a condition to my custom event ecommerce trigger = fire on cookie statistics contains allowed. Before it was firing on all events. Screenshot: https://snipboard.io/f6hXSr.jpg

    This seems to have worked as in the preview it was acting as expected! I don’t know why the other setup did not work (custom event “denied statistics”).

    BUT I’m wondering if I set up GTM4WP correctly. I have read the instructions. Please let me know if the below is correct:

    • I have enabled integration for GTM4WP
    • In wizard “GTM fires script”
    • GTM4WP Container code ON/OFF = “ON” (should this be turned off instead?)
    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @hamster2116,

    Your settings are correct, if GTM4WP integration is on, Complianz will skip inserting the snippet itself and you can configure GTM4WP to add the snippet. Complianz will only fire the needed events.

    I will have a look at the exceptions, but glad it worked.

    regards Aert

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to fire GA4 Ecommerce Event Tag only on consent’ is closed to new replies.