Skip to content

Consent platforms

When your workspace uses Wait for consent, Grona needs your consent tool’s answer before it stores or sends anything. It reads that answer from four consent tools, and from what they stored on earlier pages, with no setup on your side. This page lists what it reads from each, the events it listens for, and what to do if your tool is not one of them. The modes themselves are described on Consent and storage.

Grona asks each source in this order, and the first one with an answer decides:

Order Source What counts as consent
1 Google Consent Mode The newest consent update in window.dataLayer with analytics_storage: 'granted'. A default entry never counts, even when it is granted.
2 OneTrust Group C0002 (performance cookies) is in window.OnetrustActiveGroups.
3 Cookiebot Cookiebot.consent.statistics is true. Before the visitor answers, Cookiebot gives no answer.
4 Shopify customer privacy API Shopify.customerPrivacy.analyticsProcessingAllowed() returns true. Only a recorded “no” counts as a refusal; “not asked yet” gives no answer.
5 An earlier page of the visit An answer one of the tools announced on a previous page.
6 Stored consent cookies For returning visitors: Cookiebot’s CookieConsent cookie (statistics) and OneTrust’s OptanonConsent cookie (group C0002).
7 Grona’s own note The grona_consent key Grona writes after a yes, kept for a year.

If no source has an answer, Grona treats the visitor as not consenting.

The stored sources matter because Grona runs at the top of <head>, usually before your consent tool’s own script. On a returning visitor’s first page view, the cookies and Grona’s note supply the answer before the tool has loaded. Google Consent Mode and Shopify keep nothing Grona can read on the next page, which is why Grona keeps its own note of a yes. It removes the note as soon as any tool says no.

Answers given while a page is open are picked up from these events and count from the visitor’s next page view:

Source Event
Google Consent Mode Grona watches dataLayer.push for consent update entries. It does this even when it runs before your site creates window.dataLayer.
OneTrust OneTrustGroupsUpdated on window
Cookiebot CookiebotOnAccept and CookiebotOnDecline on window
Shopify visitorConsentCollected on document

Grona also re-reads the tools when the visitor leaves the page or hides the tab, to catch an answer that arrived another way.

Grona reads no other consent tool. With Wait for consent, visitors on a site that uses another tool are always treated as not consenting, because Grona never finds an answer. They see your original page and nothing is counted.

To use another tool, have it send a Google Consent Mode update when the visitor answers. If your tool cannot do that itself, push the update yourself from its consent callback:

window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
// Call this from your consent tool's callback once the visitor has answered.
function sendAnalyticsConsent(granted) {
gtag('consent', 'update', { analytics_storage: granted ? 'granted' : 'denied' });
}