# Costomizing a Consent popup

**URL:** <https://community.piwik.pro/t/costomizing-a-consent-popup/3153>\
**Category:** Data collection and tags\
**Created:** [November 3, 2023, 9:56am UTC](https://community.piwik.pro/t/costomizing-a-consent-popup/3153 "2023-11-03T09:56:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariana](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Mariana](https://community.piwik.pro/u/Mariana)\
**Post date:** [November 3, 2023, 9:56am UTC](https://community.piwik.pro/t/costomizing-a-consent-popup/3153/1 "2023-11-03T09:56:26Z")

</div>

Hi! I am new to Piwik, and I fighting a lot to create a custom popup very similar to the demo modal popup:

> **[Piwik PRO - Custom consent form example](https://piwikpro.github.io/ConsentManager-CustomConsentFormExample/demonstration-modal.html)**
>
> Custom consent form example for Piwik PRO Consent Manager

Enable " Ask visitors for consent" and set Custom form doesn’t appear.  
If I disable it, appears the custom popup that I created with the tag custom popup.

But If I add the code from the demo, the popup don’t appears and I get this message in the console:

VM216:4 Uncaught TypeError: Cannot set properties of null (setting ‘onclick’)  
at :4:33  
at :8:11  
at renderNode (c96ca04d-d1fc-410b-abc2-ebcf90e2aa9d.js:8:132609)  
at Array.forEach ()  
at e.render (c96ca04d-d1fc-410b-abc2-ebcf90e2aa9d.js:8:132428)  
at c96ca04d-d1fc-410b-abc2-ebcf90e2aa9d.js:8:151525  
at Array.forEach ()  
at e.consume (c96ca04d-d1fc-410b-abc2-ebcf90e2aa9d.js:8:151490)  
at e.handleEvent (c96ca04d-d1fc-410b-abc2-ebcf90e2aa9d.js:8:149190)  
at e.consume (c96ca04d-d1fc-410b-abc2-ebcf90e2aa9d.js:8:148766).

I am stuck with Piwik. Do you have any suggestions?

---

<div class="post-metadata">

**Author:** ![kamilb](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/kamilb/32/309_2.png) [@kamilb](https://community.piwik.pro/u/kamilb)\
**Post date:** [November 3, 2023, 4:06pm UTC](https://community.piwik.pro/t/costomizing-a-consent-popup/3153/2 "2023-11-03T16:06:04Z")

</div>

Hey @Mariana,

When it comes to `"Ask visitors for consent" and set Custom form doesn't appear`. You can find these settings by navigating to **Menu** \> **Administration** \> **(Your Site / App)** \> **Privacy**

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/c/c57170f070ac97747f88bf1797a8762fd9394fcd.png)

Once you view the consent settings, you should be able to find the “Use a custom consent form” option at the bottom -

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/551efd0a8d6f27f49a6619a36491d31623accc5a.png)

When it comes to the error, how did you add the code from the template? Is it in a Custom code tag?

The template code should be added in a custom code tag with **No consent is required** as the consent type and **All page views** as the trigger.

Here you can find the guide on how to implement it although I presume you already saw that - [Piwik PRO - Custom consent form example | Custom consent form example for Piwik PRO Consent Manager](https://piwikpro.github.io/ConsentManager-CustomConsentFormExample/implementation-guide.html#custom-consent-form-tag)

---

<div class="post-metadata">

**Author:** ![Mariana](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Mariana](https://community.piwik.pro/u/Mariana)\
**Post date:** [November 6, 2023, 8:54am UTC](https://community.piwik.pro/t/costomizing-a-consent-popup/3153/3 "2023-11-06T08:54:48Z")

</div>

Super!!! Now I got the custom modal popup.  
The error was that I added the custom Code using the popup tag. On apply the code with the Custom code tag, it works nicelly.  
Thanks!!!
