What is an opt-out form?


Needed permissions: owner or manage

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-in by default. When they check the opt-out 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 opt-out and DNT. 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:

Available from version 16.0.0. For versions below 16.0.0, go to Menu > Administration > Platform > Opt-out generator.

  1. Go to Menu > Administration.
  2. Navigate to Settings.
  3. On the left, click Opt-out form.
  4. Type the message you want to show to your visitors. 
    Opt-out form in Piwik PRO
  5. 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.
    Opt-out form in Piwik PRO
  6. When you’re happy with how the form looks, copy the code and paste on your website. 
    Opt-out form in Piwik PRO
  7. 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 opt-out and DNT.
    Opt-out form in Piwik PRO
  8. Go to Menu > Tag Manager.
  9. Navigate to Tags.
  10. On the left, click Piwik PRO.
  11. In Advanced tag settings, turn on Respect opt-out and DNT.
    Respect opt-out and DNT in Piwik PRO

    Note: If turned on, this tag won’t fire for visitors who opt out of tracking using our consent form. Make sure that all tags that you use to collect data have this option turned on.

  12. Click Save for the tag.
  13. Check other tags.
  14. You can also use debug mode to check how tags behave for opted-out visitors. In the top-right corner click Debug.
  15. Your website will open in a new tab with debug mode running.
    Opt-out form in Piwik PRO
  16. Toggle Simulate opt-out.
    Opt-out form in Piwik PRO
  17. You’ll see a note Opted out for each tag that has Respect opt-out and DNT turned on.
    Opt-out form in Piwik PRO
  18. When you’re happy with how the tags work, click Publish.

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center