As part of respecting your users privacy, we recommend to include the Matomo Opt-out iframe in your website. This lets your users easily opt-out of being tracked in your Matomo instance. When you include the opt-out ifame in your website, by default the opt-out feature will use the default browser HTML styles (display black text on white background with the default font), and unfortunately this default design does not look nice for most websites.

Luckily it is possible to customise the look and feel of the opt-out iframe on your website. To customise the opt-out iframe, go to Matomo > Administration > Privacy, and navigate to the section “Matomo opt-out for your visitors”. You are able to customise the font-color, the background color, the font size and the font family. To customise the opt-iframe you can use the following URL parameters:

  • backgroundColor, a hexadecimal color string for example ffffff or ddd
  • fontColor, a hexadecimal color string for example ffffff or ddd
  • fontSize, a valid CSS font size for example 1.2em, 15pt, 15px or 50%
  • fontFamily, a string containing only letters, space, or hyphen eg. Lucida, Courier new
  • language, the language of the opt-out text, a two letter code eg. en or de (see the list of all languages or get involved)

In cases where you need to customise even more aspects of the opt-out form (for example change the opt-out text itself) you can implement a custom visitor opt-out form using JavaScript.

Previous FAQ: How do I let visitors opt-out from tracking?