Support » Plugin: Google Analytics Opt-Out (DSGVO / GDPR) » Google Tag Manager

  • Resolved christoph-ED

    (@webagenturerding)


    I have Analytics with Google Tag Manager Script on my Site.
    How can I handle this with the plugin?

Viewing 1 replies (of 1 total)
  • Plugin Author Schweizer Solutions GmbH

    (@schweizersolutions)

    You’ve to check the opt-out cookie in your GTM (Google Tag Manager). If this cookie is set, you shouldn’t fire the Google Analytics code.

    Example:
    If your UA-Code is UA-12345-6, the cookie name will be ga-disable-UA-12345-6 with the value true.

    You also have the possibility to check for the window property, instead of the cookie. This is only available, if the user clicked on the opt-out link and has the value “true“.
    console.log(window["ga-disable-UA-12345-6"]);

Viewing 1 replies (of 1 total)
  • The topic ‘Google Tag Manager’ is closed to new replies.