Reference

Consent banner

Clerion sets no cookies and stores no personal data, so it needs no consent banner and none is shown by default. Some teams want one anyway, for their own policy or because other scripts on the site need it. Clerion's banner is one script tag that shows the banner, loads the tracker itself, and remembers the visitor's choice.

Add it

Replace the normal snippet with the banner's. Use the copy from Clerion; it carries your key and site id.

<script
  src="https://api.getclerion.com/sdk/clerion-consent-banner.js"
  data-api-key="YOUR_API_KEY"
  data-website-id="YOUR_WEBSITE_ID"
  data-theme="auto"
></script>

Do not keep the plain snippet as well: the banner starts the tracker, and two trackers count every visit twice.

What each choice does

The visitorWhat Clerion does
Has not chosen yetTracks the visit without keeping anything between visits. Nothing is written to the browser.
Clicks AcceptWrites the clerion_consent cookie and keeps a visitor id for a year, so Revenue by source can follow them across visits.
Clicks RejectWrites the cookie as a refusal. That browser is not tracked, now or on later visits, until the cookie expires.

The choice lasts 365 days. Settings reopens the banner so a visitor can change it.

Appearance

Optional attributes on the same tag:

AttributeValuesDefault
data-themelight, dark, auto (follows the visitor's system)light
data-positionbottom, topbottom
data-accent-colorAny CSS colour, for buttons and links#007acc
data-font-familyA CSS font stack; inherit uses your site's fontSystem font
data-border-radiusButton corner radius in pixels4
data-titleThe banner's headingWe use cookies and analytics
data-descriptionThe sentence under itA short line about privacy-friendly analytics
data-privacy-urlA link to your privacy policyNone
<script src="https://api.getclerion.com/sdk/clerion-consent-banner.js"
  data-api-key="YOUR_API_KEY" data-website-id="YOUR_WEBSITE_ID"
  data-theme="dark" data-accent-color="#171717" data-font-family="inherit"
  data-title="One cookie, your call"
  data-description="We count visits without tracking you. Accept to help us tell returning readers from new ones."
  data-privacy-url="https://yoursite.com/privacy"></script>

Your own banner

If you already have a consent tool, keep it and tell Clerion the result:

window.clerion.setConsentStatus(true);  // accepted
window.clerion.setConsentStatus(false); // rejected

Call it when your banner records a choice. The tracker writes the same cookie and behaves exactly as above. Load the normal snippet in this case, not the banner's.

Questions

Does the banner make Clerion set cookies?

One: the visitor's choice, under the name clerion_consent. Acceptance also stores a visitor id in the browser. Neither exists unless the banner, or your own call to setConsentStatus, is in use.

Does rejecting break anything on my site?

No. The tracker stops; the page is unaffected.

Something missing or wrong here? Write to hello@getclerion.com, or ask from inside the app.