Let visitors opt out of tracking

If you’re not using Consent Manager to collect and manage visitor consents for being tracked, you can use the opt-out form that will give the visitor a choice to opt out of tracking. This mechanism is not compliant with the GDPR regulations, and if you run your website in countries regulated by the GDPR it’s better to use Consent Manager. In other cases, you can use the opt-out mechanism.

In this article, we’ll explain how to install the opt-out form on your website and how it affects tracking.

Here’s an example of an opt-out form on a privacy policy page.

An example of an opt-out form from Piwik PRO.

Before you start

Here are some things to know before you add an opt-out form to your website:

  • Visitors are opted-out by default. When they mark a checkbox on the form, they will be opted-out.
  • You can adjust the code with an opt-out form to fit your website’s design.
  • When you use an opt-out form, make sure that each tag has turned on the following option: Respect visitor privacy. When this option is turned on, the tag will not be fired for visitors who opted out. This option is turned on by default, but double-check that it hasn’t been changed in the meantime.

Add an opt-out form to your page

To install the opt-out form on your website, follow these steps:

  1. Go to Menu > Administration.
  2. Navigate to Platform.
  3. On the left, click Opt-out generator.
  4. Type the message you want to show to your visitors.
  5. An opt-out message.
  6. Click Preview to see how the message will sound once installed on your website. The message will inherit your website’s CSS styles so it will look different from this preview.
  7. Preview an opt-out message.
  8. When you’re happy with how the form looks, copy the code and paste on your website.
  9. Code for an opt-out message.
  10. Now the opt-out form is on your page. To make sure it’s ready to use, you need to check if tags have turned on the following option: Respect visitor privacy.
  11. Opt-out form on a website.
  12. Go to Menu > Tag Manager.
  13. Navigate to Tags.
  14. On the left, click Piwik PRO tag.
  15. In Advanced tag settings, toggle Respect visitor privacy.
  16. Respect visitor privacy option in Piwik PRO.

    Note: When this option is turned on, the tag will not be fired for visitors who opted out. So when you use an opt-out mechanism, all your tags responsible for collecting data should have this option enabled. This option is turned on by default, but make sure that it hasn’t been changed in the meantime.

  17. Click Save for the tag.
  18. Check other tags.
  19. You can also use debug mode to check how tags behave for opted-out visitors. In the top-right corner click Debug.
  20. Your website will open in a new tab with debug mode running.
  21. Debug mode in Piwik PRO.
  22. Toggle Simulate opt-out.
  23. Simulate opt-out in debug mode in Piwik PRO.
  24. You’ll see a note Opted out for each tag that has Respect visitor privacy turned on.
  25. Simulate opt-out in debug mode in Piwik PRO.
  26. When you’re happy with how the tags work, click Publish.
Was this article helpful?

Be the first to rate this article.

Technical Support

If you have any questions, drop us a line at support_SPC@piwik_SPC.pro.

We’re happy to help!