# Custom Consent Form and Consent stat tracking

**URL:** <https://community.piwik.pro/t/custom-consent-form-and-consent-stat-tracking/2281>\
**Category:** Data collection and tags\
**Created:** [May 24, 2023, 11:19am UTC](https://community.piwik.pro/t/custom-consent-form-and-consent-stat-tracking/2281 "2023-05-24T11:19:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anpolunar](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anpolunar](https://community.piwik.pro/u/anpolunar)\
**Post date:** [May 24, 2023, 11:19am UTC](https://community.piwik.pro/t/custom-consent-form-and-consent-stat-tracking/2281/1 "2023-05-24T11:19:11Z")

</div>

I’m using Cookie Information as my consent system, and I’d like to integrate it with the Consent Tracking report in Piwik analytics, so that I can see the “No decision” rate.  
But unfortunately, I don’t see any numbers in “No decision” - it’s just a flat 0.

Is it supposed to work with Custom Form? Otherwise I’m considering making my own “No decision” metric that is calculated like so:

```auto
( {consent_form_impressions} - ({consents_full}+{consents_none}) )

```

My setup is as follows:  
I fire these two functions when the Cooke Information popup is shown:

```auto
ppms.cm.api("setInitialComplianceSettings", { consents: ["analytics"] });
ppms.cm.api('trackMainFormView')

```

And then when a decision is made (1 when consent, 0 when not)

```auto
var hasConsent = getConsent();
ppms.cm.api("setComplianceSettings", { consents: { analytics: { status: hasConsent ? 1 : 0 } } } );
if (hasConsent)
  ppms.cm.api("trackAgreeToAllClick")
else
  ppms.cm.api("trackRejectAllClick")

```

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [May 24, 2023, 11:38am UTC](https://community.piwik.pro/t/custom-consent-form-and-consent-stat-tracking/2281/2 "2023-05-24T11:38:37Z")

</div>

Hi [anpolunar](https://community.piwik.pro/u/anpolunar)!

The `No decisions` metric’s formula is `consent pop-up impressions - decisions (consent or rejection)`.

As long as you are using `ppms.cm.api("track<interaction>")` methods to gather statistics in your integration, these numbers should show up in the `Consent` report.
