For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

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.

The floating cookies button displayed at the bottom left of a website
The floating button
The introduction window of the banner
The introduction window
The preferences panel with cookies classified by purpose
The list of cookies 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 scanning

To classify cookies by consent categories, go to the following page:

Classify cookies by consent categories

Open the banner editor

  1. In the menu, click Cookie consent > Banners.

  2. 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.

The banner editor with its collapsible sections and the Save changes, Save and exit, Preview banner and Actions buttons
The banner editor

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.

To duplicate a banner, use the menu to the right of the banner in the list of banners.

Settings reference

Settings

The Settings section holds the basic settings of the banner.

The Settings section with the Urls authorized (Allowed origins) field and the advanced settings block
The "Settings" section
Setting
Purpose

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.

Setting
Purpose

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.

The Templating of the banner section with the banner preview
The "Templating of the banner" section
Setting
Purpose

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.

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.

This action has no effect when a domain is set in Consent cookie domain, because the choice is then shared between several subdomains.

Insert the banner code on your website

Once the banner is configured, install the lines of code generated by Dastra.

  1. Open the Installation section of the banner.

  2. Click the JavaScript card.

  3. Copy the generated code.

  4. Insert it before the closing </body> tag of every page of your website.

The JavaScript integration code generated by Dastra
The generated integration code

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.

You can use Google Tag Manager to insert this code dynamically on each page.

The generated code depends on the hosting region of your organization. Always copy it from the application.

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.

The Cookies policy section with the available formats
The formats of the cookie policy

Last updated

Was this helpful?