Embedding agreements without displaying a widget
If you are not running our cookie widget, you can still embed any policy on your website. Here's how you do it.
Last updated
If you are not running our cookie widget, you can still embed any policy on your website. Here's how you do it.
Last updated
To embed your policy on a website, you need to load one of our widgets to load the policy. However, if you aren't using our cookie widget, you would want to avoid unnecessary widgets to pop up. Luckily you can use any of our widgets in stead to activate the policy load.
In this example we'll use our newsletter widget as a non-showing dummy widget to load the policy.
First we need to create a container for the policy. It is important that you give this container a unique CSS selector id so we later can target this container.
The container should be placed where you want to load the policy, as it will be loaded inside this container.
Here's how the container should look:
The ID can be anything unique. We suggest using something recognisable, matching the policy in question like for example:
"DPA-container" or "privacy-policy-container"
Secondly we need a dummy widget to load the policy.
Go to app.openli.com and click widgets in the side menu.
In the top right corner click "New widget"
Select the cookie widget
click save and exit
Finally you are ready to insert the script that loads the policy into the container.
Make sure you have legal.js loading on the page:
And below that insert this script:
Note that it is important here that the CSS selector matches the unique ID you gave the policy container in the first step.
You will find the policy's private key in app.openli.com under agreements:
And you'll find the dummy widget's public key under widgets in the app
Once these two script are in, the page should load the policy automatically when opened and no widget is shown.