FAQ

This is the official “Frequently Asked Questions” of the Google Analytics Opt-Out WordPress Plugin.

What are the requirements?

How does it work?

  1. The plugin shows a little banner with a hint that lets a user opt-out of Google Analytics.
  2. Once clicked on this link a JavaScript will set a cookie that let Google Analytics know that the user don’t want to be tracked.
  3. Then the banner will fade out or will show a little information window on the bottom right.

Read more about the Analytics opt-out functionality on Googles Help pages for ga.js or analytics.js.

What is the difference between the free and the pro version?

The free version only allows to add a special link to your privacy page (using the shortcode). The pro version shows a banner an all pages instead and has various settings options, too.

How can I set it up?

  1. Install the plugin according to the installation instructions in the PDF that was delivered with the plugin.
  2. After activating the plugin search for the “Analytics Opt Out” link in the “Settings” menu of your WordPress Administration panel

Yes. For this just use the “cut”-Button in the editor. Note that this button only appears if it has been activated in the settings section.

Google Analytics Opt-Out WordPress Settings

Is this a proper implementation of the EU-Privacy Directive or the GDPR (General Data Protection Regulation)?

First of all: The installation of this plugin does not replace any legal advice you might need to put the EU-Privacy Directive or the General Data Protection Regulation into practice accordingly.

How can I style the banner?

Just use the CSS-textarea field on the settings page of the plugin. For changing the background-color you can do something like this:

If you want to display the banner like we have it on our site, please use this code:

Can I hook into some functions with my own plugin?

Yes. These are the hooks and filters:

  1. Hooks
    1. gaoop_js_before_script
      executed before the Javascript output
    2. gaoop_js_after_script
      executed after the Javascript output
  2. Filters
    1. gaoop_standard_styles_array
      The array of CSS (key-value pairs)
    2. gaoop_standard_styles
      The rendered CSS text of the standard styles
    3. gaoop_custom_styles
      Used to add custom styles
    4. gaoop_get_ua_code
      Returns the Google Analytics UA-Code
    5. gaoop_cookie_set
      Javascript that is executed when the cookie has been set (normally this is an alert)
    6. gaoop_opt_out_cookie_set_text
      The text that is used by the alert function. Normally this is: “Thanks. We have set a cookie so that Google Analytics data collection will be disabled on your next visit.”
    7. gaoop_stop_head
      Should return either true (header script should be echoed out) or false (header script should not be echoed out). Very useful if you want to add your own Javascript to one of your theme files

What are the shortcodes that I can use?

  • [google_analytics_optout]Your link text[/google_analytics_optout]
    Integrates a link into any WordPress editor that allows a user to opt-out off Google Analytics.
  • [google_analytics_optout_close]I know[/google_analytics_optout_close]
    Can be used for a external link to close the opt-out banner.