Insert the HTML code available in the "Code" section of the Dastra Cookie Consent Module before the end of the <BODY> tag on your website, on all pages. You can use the Google tag manager to dynamically insert this code on each page.
For the code to work properly, make sure the public key of your API is configured correctly beforehand.
Here is how the widget integration code looks:
The div with the id "dastra-cookie-consent" will be the rendering location of your consent widget. The "data-widgetid" attribute is used to identify the widget being invoked, it is often a number (int32). {your_public_key} is your API public key which can be retrieved here.
Once the code is inserted in the tag of your site, the widget will display on your site.
For optimal performance, the widget is automatically cached by the browser in the sessionStorage
Wordpress
If you use Wordpress, you will find in the link below more information on how the generated code can be inserted at the end of the html tag of your website.