If you’re not using Consent Manager to collect and manage visitor consents, you can use our opt-out form, which lets visitors choose not to be tracked. Just keep in mind that this form doesn’t comply with GDPR regulations. So, if your site is used in GDPR-regulated countries, it’s better to switch to Consent Manager.
Here’s an example of our opt-out form on a privacy policy page.

In this article, we’ll show you how to set up the opt-out form on your website and clarify its effect on tracking.
Before you start
Here are some things to know before you start:
- Visitors are opted-in by default. If they want to opt out, they can do so by checking the opt-out box on the form.
- You can customize the form’s code to match your website’s look.
- When using an opt-out form, make sure that Respect opt-out and DNT is on for each tag. This setting prevents tags from activating for visitors who have opted out. It’s usually turned on by default, but it’s a good idea to double-check.
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 Account.
3. On the left, click Opt-out form.
4. Type the message you want to show to your visitors.

5. Click Preview to see how the message will appear on your website after installation. The message will adopt your website’s CSS styles, so it will look different from this preview.

6. When you’re happy with how the form looks, copy the code and paste it into your website.

7. The opt-out form is now on your page. In the next steps, you need to make sure that Respect opt-out and DNT is turned on for the tracking tag.

Note: If you selected Opt out of tracking, you should see later in debug mode that the Piwik PRO tag didn’t fire. In the tag details, you’ll find the reason listed as “Respect opt-out and DNT is turned” on and that it is due to opt-out.
8. Go to Menu > Tag Manager.
9. Navigate to Tags.
10. On the left, click Piwik PRO.
11. In Privacy, turn on Respect opt-out and DNT.

Note: If turned on, this tag won’t fire for visitors who opt out of tracking using our opt-out form. Make sure that all tags that you use to collect data have this option turned on.
12. Click Save.
13. Check the other tags.
14. You can also use debug mode to see how tags behave for opted-out visitors. Go to Debug mode.

15. In Your site address, type in or select your site or app address.

16. Click Connect.
17. Once your site is connected, it will open in a new tab.
Note: If you have any trouble connecting, check that:
- Your browser allows popups. Some browsers, such as Safari, block them by default.
- The necessary code is installed on your site.
- You entered the correct site address.
- Ad blockers are turned off.
18. (Optional) Turn on Prevent page reload. This will stop the page from refreshing when you click elements that would normally trigger a reload.
Tip: This option is useful for testing form submissions and link clicks.
19. If the Piwik PRO tag has Respect opt-out and DNT on and you opted out from tracking using the opt-out form, the tag won’t fire.
20. To check if Piwik PRO wasn’t fired, go to Tags.
21. Click Piwik PRO.

Note: Piwik PRO tag is a default tag necessary for basic tracking.
22. See what trigger is set for the tag.

23. In Events, find the stg.pageView event.

24. In Tags, find the Piwik PRO
tag for this event.

25. In Reasons this tag didn’t fire, check that Respect opt-out and DNT is turned on for this tag.

26. When you’re happy with how the tags work, click Publish.

27. All done!