Matomo includes a built-in opt-out form that you can add to your website so you can provide your visitors with the choice to opt-out of Matomo tracking. Up until Matomo 4.12.0 the built-in opt-out form relied on iFrame technology which has become increasingly problematic due to browser changes and restrictions on setting third-party cookies.
With our privacy-first approach, we’ve known for some time that we would eventually need a new way to provide this important opt-out functionality that would work most reliably in the myriad of contexts our users rely on it for.
Embedding the opt-out form
Matomo 4.12.0 introduces an improved opt-out. This provides two new options for embedding the opt-out on your website, either using the Matomo tracker code or as self-contained code.
As with the iFrame method, the built-in opt-out code can be styled in Matomo to match your website, and provides a snippet which you can add to your website to show the opt-out feature to your users.
Find out how to customise the opt-out form.
Customising the opt-out form
What does this mean for existing opt-out forms?
Although it is no longer possible to generate new iFrame embed code using the Matomo UI, the underlying opt-out feature is still fully supported and any existing iFrame opt-out form code embedded in websites will still work as before. It is recommended to migrate to one of the new opt-out form options as browser support for the iFrame opt-out will continue to decrease.
To read more in depth information about the new opt-out functionality please refer to our new developer documentation for tracking opt-out.