Functioning of the widget
Overall operation:
Overall, the consent widget works in 3 main steps:
The proposal of the consent window
The collection of consent (storage of evidence)
The actual execution of the user's consent
The Dastra widget can cover the first two steps partially automatically. For the third step of actually enforcing the user's cookie preferences, you will need to technically integrate the consent system with third-party services that may potentially set cookies. See the Blocking Cookies Guide for more information.
The widget's javascript SDK must be called on all pages of the site using cookies.
/IMAGE
1. Visit to the client's website
The user visits the website where the js code snippet is installed. In order not to impact the performance and the SEO of the web pages, the SDK is loaded in a totally asynchronous way with a one day caching period.
2. and 3. : Collect and cache the widget configuration
For the widget to work properly on the site, it will need an up-to-date client configuration retrieved from the Dastra servers. To get the freshest version possible, it will make a GET request of the widget with the public API key to check the widget's membership to the client.
If the client has not correctly entered his domain in the widget editor, the editor will not allow the request and it will be impossible to display the widget correctly. To fix this, go to this page, choose your widget and add the missing domain.
4. Requesting consent from the user
If the "euconsent" cookie (you can choose the name of the cookie if you wish) is missing, the consent window will appear. To test if the widget is displayed correctly, you can delete this cookie from your browser.
5. Collecting consent
Consents will be automatically collected by the Dastra API via a POST request in json.
Although in the widget interface, the expression of consent is done by purpose, the storage is done by service.
Here is what the proof of consent looks like as stored in our databases:
In return, the api will return a string named "consentId" which will then be stored in the browser in the localStorage for up to 180 days. This string is the unique identifier of the consent proof. In the case of a dispute, it's this identifier that will be searched in the client's browser.
6. Execution of consent
Once we have collected the user's consent, it's now necessary to actually carry out the user's wish by transmitting the consent information to all the services on the site.
For this phase, we invite you to consult the guide on blocking cookies:
Blocking cookiesWith the exception of strictly necessary cookies, all third-party tracking services should be blocked by default.
Congratulations, you are ready to start the technical integration of the widget:
Quick startDernière mise à jour