Custom consent form
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.
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:
- Go to Menu > Administration.
- Navigate to Websites & apps.
- On the left, pick a website or app that you want to work with.
- In Privacy, click Configure.
- Check Custom consent form. This form will override a default consent form.
- 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:
- Add the following script before
</body>HTML element on your site.
- Include CSS style after
<head>HTML element on your site.
<script> var ppms_consenturl="https://cdn.piwik.pro/consent/1.1.1/form.html"; </script> <script src="https://cdn.piwik.pro/consent/1.1.1/script.min.js" integrity="sha384-lygGKHTWa1t5vmtzcuqMu+8lSJMvrjmjSjUPtGHdNw9ECkG5lhO+yT84ZDZwomqu" crossorigin="anonymous"></script>
<link rel="stylesheet" href='https://cdn.piwik.pro/consent/1.1.1/style.min.css' integrity="sha384-DqTbs8R8D2euyCDTPA0lOFt/dC1wZw0P23QBg8kpHkmRDdUZZik4AuSdvmOmGqLX" crossorigin="anonymous" />
Note: Check the latest version on GitHub to be up to date.