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.