Aller au contenu principal

Bannière de consentement

Une bannière qui demande à vos visiteurs ce qu'ils acceptent, chaque réponse étant gardée sur la personne.

Building the banner

The consent banner sits under Build, after the messenger: one banner per project. The parts are on the left: the layout (a bar at the bottom or the top, or a box in a corner) with the privacy policy link, the texts in each language (every language the console speaks to start with), the categories asked (analytics, marketing and functional; necessary is always on), the region rules and the style. The banner shows over a sample page in the middle, and Accept all and Reject all are always drawn alike. A colour pair under 4.5:1 is refused.

Region rules ask visitors in the European Union and the EEA, the United Kingdom, Switzerland and Brazil first, and only notify everyone else; each rule can be changed. Region rules come with Growth and up; without them every visitor is asked first. The region is read from the visitor’s address on the edge, never from the page. Edits stay a draft until Publish; a visitor who answered an older version is asked again only when it adds a category, and Take offline stops showing the banner.

Placing it

Load <script src="…/consent.js" data-key="…"> on every page before the other Prodantix scripts, and add data-consent="banner" to them (or consentMode: 'banner' to the web SDK). Until analytics is granted where the rule asks first, the SDK keeps nothing on the device and counts the visitor under an id that changes every day; once granted it keeps a new id, joined to nothing before. A site’s own scripts written as <script type="text/plain" data-prodantix-consent="marketing"> run only once their category is granted, and any element marked data-prodantix-consent-settings reopens the settings. Landing pages served by Prodantix load the banner on their own.

Every answer is kept on the person: the categories, the banner version, the region rule, the page and when. A form’s consent checkboxes are kept the same way, with the purposes agreed. A person’s Consent tab shows each category with their current answer, then every answer they gave; exporting a person includes them and erasing a person erases them.

Where this meets the API

On GraphQL crmConsentBanner reads the banner and crmPersonConsents a person's answers; saveCrmConsentBanner, publishCrmConsentBanner and unpublishCrmConsentBanner change it, and every change arrives on the crmConsentBannerChanges subscription (GraphQL reference). REST serves the same under /v1/projects/{projectId}/consent-banner and /v1/projects/{projectId}/people/{distinctId}/consents, and the MCP tools are prodantix.consent.banner, prodantix.consent.person, prodantix.consent.save, prodantix.consent.publish and prodantix.consent.unpublish. A visitor's browser reads the banner and records an answer at /v1/consent on the edge.