Install the widget
This guide will show you how to install your cookie widget.
Last updated
This guide will show you how to install your cookie widget.
Last updated
In this final step, you'll install the widget on your website. You'll need your widget's JavaScript code snippet to do so.
To find your code snippet, go to the Openli dashboard and select "Widgets" in the side menu. Click on the cookie widget you previously created and copy the code.
It will look like this:
The snippet must be included immediately before the closing-tag of the body
element in your site's main template, like this:
The code snippet you can see in the text box needs to be copied and added to your website. If you have experience with coding, you can do this yourself. If not, the final part of the step will need to be completed by your developer or someone who manages your website. You can read more in .
If you are unable to do this, you must ensure that the call to legal.widget(...)
occurs after the DOM is ready, using a combination of the DOMContentLoaded
event and the document.readyState
property. provides a good overview of the events involved. Contact us if you are in doubt.