Set up the cookie consent banner
Learn how to configure the cookie consent banner, install it on your website and generate the cookie policy.
Dastra lets you set up a cookie consent banner on your website that follows the CNIL (French data protection authority) recommendations on cookies and other trackers.
What the cookie consent banner consists of
The banner is made of several elements:
a floating "cookies" button, which stays visible so that visitors can change their choices;
a fold-out introduction window;
the list of cookies used by the site, by purpose.



Prerequisites
To set up the banner, you must first identify the cookies placed on your website and classify them by purpose. The Cookie consent module brings all the steps together, from these prerequisites to the code to install.
To scan the cookies placed on your website, go to the following page:
Cookies scanningTo classify cookies by consent categories, go to the following page:
Classify cookies by consent categoriesOpen the banner editor
In the menu, click Cookie consent > Banners.
Click the banner to edit.
The editor is a single page made of collapsible sections: Installation, Settings, Services, Texts and localizations, Templating of the banner, Triggers, Cookie consents integration and Cookies policy. The Installation and Settings sections exist only for the default configuration: a geo-targeted variant does not show them.

At the top of the editor:
the Status switch enables (Enabled) or disables (Disabled) the banner;
the variants drop-down shows Default configuration and lets you create a geo-targeted variant;
Preview banner displays the banner on a page of your website (see Test the integration of a banner). The button is disabled until at least one URL is set in Urls authorized (Allowed origins);
Save changes and Save and exit publish your changes;
the Actions menu gives access to Restart user's consents collect and Delete.
Settings reference
Settings
The Settings section holds the basic settings of the banner.

Choose a friendly name for this banner
Name of the banner in the list.
Urls authorized (Allowed origins)
Required field. Enter the address of each website that displays the banner, in the form https://www.example.com, without a path. The address must match the origin of the site exactly: www.example.com and example.com are two different addresses. An origin missing from this list is the first cause of a banner that does not appear.
Automatic generation of the cookie policy ?
When enabled, the banner offers a link to the cookie policy generated by Dastra. Otherwise, enter the address of your own policy in Enter a valid url of your cookie notice.
The advanced settings block contains the following options.
Preview mode
Disables the configuration cache and the collection of statistics. Do not leave it enabled in production.
Disable the banner display (all cookies with default consent will be triggered)
Displays no banner: all services are applied with their default consent. Reserve it for areas with no prior consent requirement.
Enable Global Privacy Control (GPC)
Automatically refuses non-essential cookies for visitors whose browser sends the GPC signal. See US Privacy.
Save consent proof
When disabled, Dastra keeps no proof of consent and no display statistics.
Consent expiry time (Default to 180 days)
From 1 to 365 days. When it expires, the banner is offered again.
Enable localStorage store for consent cookies
Stores the choices in the browser localStorage instead of a cookie. Consent is then not shared between subdomains.
Consent cookie domain (Default to current page hostname)
Available with cookie storage. Enter for example .example.com to share consent between all subdomains.
Cookie consent name (Default to consent-eu)
Name of the cookie, or of the localStorage key, that holds the visitor's choices.
Services
The Services section lists the services declared in the banner. Click Website scanning to scan the site again, Selection in the library... to add a service from the Dastra library, or Create service to create one. See Classify cookies and Cookies scanning.
Texts and localizations
This section is used to add languages and edit the texts of the banner. See Language management.
Templating of the banner
Set the look of the banner here. The preview on the right updates as you edit.

Banner position
Five positions: top left, top right, Centered, bottom left, bottom right.
Primary color, Popover's background color, Main text color, Title's color, Button's text color, Secondary color
Colors of the banner.
Font family name (Uses a base webfont or a font installed on your website)
Font used by the banner: a base web font or a font installed on your website.
Display a custom button image
Replaces the opening button with an image of your choice, preferably square. Once the image is uploaded, Button layout offers Circle, Rounded or Square.
Display "Continue without accept button"
Adds this button to the banner.
Show a fixed button for configuring the cookies after initial screen
Keeps the floating button displayed after the first screen.
Display the close button on the right top of the modal
Adds a close cross. Hidden when the "Continue without accept" button is enabled.
Hide the Dastra's copyright (Premium)
Depends on your plan.
Custom CSS
CSS rules applied to the banner. See Advanced Design.
Triggers
Triggers define when the banner appears:
Scroll before trigger in %: the banner appears once the visitor has scrolled this percentage of the page;
Time before the panel open (milliseconds): delay before the banner is displayed.
Cookie consents integration
For each service, this section generates the snippets to place in your pages to actually block cookies: HTML integration, custom JavaScript and Google Tag Manager. It comes with a checklist. See Blocking cookies.
Cookies policy
This section generates the cookie policy. See Generate the cookie policy.
Restart user's consents collect
The Restart user's consents collect action in the Actions menu regenerates the version key of the banner: visitors who already made a choice are shown the banner again on their next visit. Use it after adding a service. It does not delete the proof already collected.
Insert the banner code on your website
Once the banner is configured, install the lines of code generated by Dastra.
Open the Installation section of the banner.
Click the JavaScript card.
Copy the generated code.
Insert it before the closing
</body>tag of every page of your website.

Ask your webmaster to do this step. Once the code is installed, the banner appears on your website. The Copy button copies the code, and a second snippet shows how to reopen the banner from a button on your site. See Quick start.
Generate the cookie policy
The Cookies policy section of the banner automatically generates your cookie policy from the banner configuration: services, cookies, purposes and durations. First choose the language in the Locale field, then the format:
Copy link: the address of a public page that displays the policy;
Html: the HTML code of the policy, to copy;
Script: a snippet to place in your policy page. It loads the Dastra SDK, which displays the policy and updates it automatically when you change the banner;
Markdown, PDF file (.pdf) and Word (.docx): documents to download.
To use the script format, add the following element to your page, replacing the values with the ones shown in the application:
The section is available when your changes are saved. Each language of the banner produces a policy in that language. If you enable Automatic generation of the cookie policy ? in the Settings section, the banner sends its visitors to this policy.

Last updated
Was this helpful?