Editing consent form - custom consent form


I´m just getting started with Piwik Pro Core so my Boss and me chose which consent form to use.
We would like to use the bottom bar, however the sliders only show up when clicking on “show detailed settings”.

We would like to rather show the sliders in the bottom bar by default instead, as you can make them pre-selected by default, so the user only has to click accept. Visually that’s also more appealing.

An alternative would also be to make a complete custom consent form, is this possible using the API?

Thanks in advance
Peter Dobrovka

1 Like

Hi @Peter_Dobrovka, welcome to the community!

Although there’s no switcher in the user interface the behavior you’re looking for is easily achievable with a custom JS tag (Piwik PRO Tag Manager → Add new tag → Custom asynchronous tag) with the following code:

  document.querySelector("#ppms_cm_content_expander_hide_btn").setAttribute("class", "ppms_cm_content_expander_hide_btn expanded");
  document.querySelector("#ppms_cm_content_expander_show_btn").setAttribute("class", "ppms_cm_content_expander_show_btn expanded");

This should be fired on dataLayer event ppms.cm:getComplianceSettings

Also, FYI: you can code your own consent form. I’d recommend using a template that already talks to our API: Custom consent form | Piwik PRO help center

If you go with custom consent, make sure to change the settings under Administration → Websites & apps → your site → Privacy → enable “Use a custom consent form” so that the default box is suppressed.


Thank you very much for the fast response,
that’s all the information i needed :slight_smile: