Custom consent form

Needed permissions: owner

If you want to show visitors a custom consent form instead of a ready-made form from Consent Manager, you can use our custom solution and API.

An example of a custom consent form in Piwik PRO.

Before you start

Here are some things to know before you set up a custom consent form:

  • You need to install an asynchronous tracking code on your website.
  • A custom consent form overrides default forms.
  • All collected consents will show up in Consent Manager.
  • Approvals made via a custom consent form affect data collection and tag firing mechanism.
  • To design the custom consent form, you can use our example implementation available on GitHub

Enable a custom consent form

To enable a custom consent form, follow these steps:

  1. Go to Menu > Administration.
  2. Navigate to Websites & apps.
  3. On the left, pick a website or app that you want to work with.
  4. In Privacy > Consent Manager, click Configure.
    Custom consent form in Piwik PRO
  5. Check Custom consent form. This form will override a default consent form.
    Custom consent form in Piwik PRO
  6. Click OK.

Design a form

To design the custom consent form, you can use our example files from a GitHub repository.

Add a script and CSS style

To show a custom form on your website, follow these steps:

  1. Add the following script before </body> HTML element on your site.
        var ppms_consenturl="";
    <script src="" integrity="sha384-lygGKHTWa1t5vmtzcuqMu+8lSJMvrjmjSjUPtGHdNw9ECkG5lhO+yT84ZDZwomqu" crossorigin="anonymous"></script>
  2.  Include CSS style after <head> HTML element on your site.
    <link rel="stylesheet" href='' integrity="sha384-DqTbs8R8D2euyCDTPA0lOFt/dC1wZw0P23QBg8kpHkmRDdUZZik4AuSdvmOmGqLX" crossorigin="anonymous" />

    Note: Check the latest version on GitHub to be up to date.

Was this article helpful?

Technical Support

If you have any questions, drop us a line at

We’re happy to help!