> Agents can also search and read this documentation through its [MCP server](https://docs.openli.com/docs/~gitbook/mcp).

# Introduction

Welcome to our Help Center! On these pages, you'll find guides for getting started with Openli and beyond.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FZjwdCELvoX5qm4reRBLV%2Fconnect-openli.png?alt=media\&token=1d0809ba-fae0-47b0-b865-9cb22528dc75)

## Getting started with Openli

Easy and simple guides to get you started with Openli.&#x20;

{% content-ref url="/pages/-MG7\_WthN79JGGgfQGrd" %}
[Quickstart](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster)
{% endcontent-ref %}

{% content-ref url="/pages/-MHBepquNYY-R5s7sb4u" %}
[Checklist: Cookies](https://docs.openli.com/docs/cookie-consent-management/checklist-cookies)
{% endcontent-ref %}

{% content-ref url="/pages/-LRaxn1SnPONsdxXnW-9" %}
[Dictionary](https://docs.openli.com/docs/getting-started-1/dictionary)
{% endcontent-ref %}

{% content-ref url="/pages/-M6jA2BXjL02WhC2INja" %}
[FAQ](https://docs.openli.com/docs/getting-started-1/frequently-asked-questions-about-our-cookie-consent-solution)
{% endcontent-ref %}

## Technical documentation

{% content-ref url="/pages/-M5MgHXYmb6Id9ZS5qLY" %}
[Collect cookie consent](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent)
{% endcontent-ref %}


# Dictionary

Here you find a dictionary of important words and definitions that will help you understand the core concepts behind Openli.

## Identifier

The identifier lets you identify a user with a unique user ID that you choose. An optimal identifier will be something that doesn't change, like a database ID.

It's a good idea to put a bit of thought into what you use as an identifier. A few key inputs on how to select a good identifier:

* The user should not be able to change the identifier, i.e. don't use an email address, name, etc. as identifier.
* The identifier should be accessible all places where you want to use Legal Monster, so don't use something that only lives in your mobile apps and not in your web-app, etc.

## Projects

In Legal Monster everything is tied to a project. A project holds multiple agreements, widgets, user consents in the audit trail, etc. An account can have multiple projects.

Projects can be used for multiple purposes, some listed here:

* To separate your test environment from your production environment when developing using our [API](https://docs.openli.com/docs/documentation/legal-monster-api) or our [widgets](https://docs.legalmonster.com/legaljs).
* To separate different products, for example, a gaming studio that has different published games might give each game its own project.
* To separate languages, e.g. one project for English, one for Danish, etc.

## Widgets

Every project can have a variety of differently-configured widgets, which are used to obtain consent in different circumstances. This variety includes, among others:

* Separating different segments of users, like business users (B2B) from consumer users (B2C).
* Requesting different types of consent, such as consent to your Terms of Service, or consent to receive email marketing.
* Collecting cookie consent.


# FAQ

We have collected the most frequently asked questions in this section of the Help Center.

If you have a question but can’t find the answer here, feel free to contact us at <hello@openli.com>. Alternatively, use the contact function here on the website or when you're signed in to your Openli account. Just look for the message icon in the lower right corner.&#x20;

## Cookie widget FAQ

### Is there a way to hide or remove the shield button?

At Openli, compliance is paramount. To be compliant, there must be a way for users to access their cookie settings at all times, and in an easy accessible way.

It is possible on the [Cookie Business plan](https://www.legalmonster.com/pricing/) to use a link instead of the shield to enable access to cookies. You can place the link anywhere on your page, but it has to be available on all pages. [Read more here](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/use-custom-link-button-instead-of-cookie-shield). &#x20;

You can also attach the shield to the very bottom of your website. That way, it is not constantly visible, floating on the screen, but can still be accessed easily when your users scroll down to the bottom of your page.

You can change this setting by signing in to your Openli dashboard > then selecting Widgets > Cookie widget > Edit Widget > Widget layout and here choosing where you want the shield to stick to.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-M_Ug1iarRy5VFXi1hPt%2F-M_UhMPJcxeKWqIYuYxS%2FSk%C3%A6rmbillede%202021-05-12%20kl.%2010.32.54.png?alt=media\&token=3c3e7926-174a-4191-b911-d43765147d2c)

### How do I change the language of my widget?

The languages supported are English, Danish, Norwegian, Swedish, Spanish, French, Finnish, Dutch and German. The default installation language is English but by following [this guide](https://docs.legalmonster.com/guides/cookie-widget/setup-widget-language), you can easily change the widget language to one of the other language options. &#x20;

### How do I change the colours of the widget?

Color customisation is a great way to infuse your branding to your cookie pop-up and make it a more cohesive part of your website. Simply use our widget builder to easily add your brand colours. You can access the widget builder by logging on to your Openli account > selecting `Widgets` > then locating your Cookie Widget and clicking the green customisation button.

### I have previously styled my cookie pop-up by customising the code. Can I style it now using your widget builder?

Yes, you can absolutely use our new widget builder to customise and style your cookie pop-up. The only thing you must do first is to remove any code customisations you have added to previously style the pop-up. Otherwise your cookie pop-up might not respond to the new styling. You can access the widget builder by logging on to your Openli account > selecting `Widgets` > then locating your Cookie Widget and clicking the green customisation button.

### My website is in multiple languages. Does your cookie solution support that?

Yes, absolutely! On our Cookie Business, Website Compliance and Privacy Center subscriptions (link to pricing page), you can have your cookie solution and cookie policy in multiple languages. Send us an email at <hello@openli.com> and we’ll help you get set up.&#x20;

### What language should my widget and cookie policy be in?

As a Rule of thumb your Widget and cookie policy should always match the language of the website it is on. \
\
For example; a Dutch website should have the cookie policy and the widget in Dutch but if the website is in English the widget and policies should be in English even if the company is Dutch.\
\
For information on how the change the language in the widget [see our guide here.](https://docs.legalmonster.com/guides/cookie-widget/setup-widget-language)\
\
If you have a multi language website, the widget and policy should always match the active language, so English when viewing the site in English and Dutch when viewing the site in Dutch.\
\
If you need to setup multiple languages you need to use our projects feature, which is currently available from our cookie business subscription tier. Contact us at <hello@openli.com> for more information on our subscription options :)

## Account FAQ

### **I didn’t receive an activation email for my account.**

First of all, welcome to Openli! \
When missing an activation email, we always recommend these steps:

1. Have you checked your spam folder?&#x20;
2. Are you checking the correct email inbox? Many of us have several email accounts and can sometimes forget which one we signed up with.

If none if this worked, email us at <hello@openli.com> and we’d be happy to help you further.

### Does the amount of visitors to my site affect which plan I should get?

Yes, however, if you are a non-profit organisation, charity or have a special case that requires a high volume of consents, please contact us for a bespoke plan and pricing at <hello@openli.com> or go ahead and [book a call with us](https://openli.com/demo).

### How do I change my password?

If you want to change your password, it is easy to do so.\
\
All you need to do is log in to [app.openli.com](https://app.openli.com), then click *settings* in the bottom left hand corner. \
On the settings page, locate the *employees* section, and click *edit* on the employee you need to change password for. \
On the employee page you can change the password. \
\
Don't forget to make it a good one - "*password"* or "*12345"* won't do ;)

### I forgot my password?

Well don't worry, it happens to us all :)&#x20;

Simply go to [app.openli.com](https://app.openli.com) and click *Forgot your password?* below the login box. Then you can use the email you signed up with to receive an email to reset your password. \
\
Don't forget to find a good one that is easy to remember.

### How do I add users to my Openli account?

Adding new users to your account is easy.&#x20;

Go to *settings* in the bottom left hand corner. Once on the settings page, scroll down until you see the option to *add employee.* Click this and insert the email of the employee you want to add.&#x20;

Once added, the user will receive a welcome email with a link to create a password.

You can see the whole process in the short video below.

![](https://cdn.loom.com/sessions/thumbnails/5455e232f1234bdc81d7a5e51985dd23-with-play.gif)

### Where do I find my invoices?

When you log onto your Openli account, select Settings in the lower left corner. Under the "Company" section there is a green button called "Manage billing". Here you can see your billing information and download your past invoices.

{% embed url="<https://www.loom.com/share/8349b3014b784d098558f1e837e255d9?sharedAppSource=team_library>" %}

### How do I delete my account?

If you want to delete your Openli account, please contact us at <hello@openli.com>. Please note that deleting your account doesn’t mean that we’ll automatically delete your data as well, so make sure to specify this in your delete request.&#x20;

### How do I delete my data?

If you want us to delete the data you have collected via your Openli account, please write to us at <hello@openli.com>. We respect the GDPR and since you are the data controller for the consents collected through our products, we’ll of course honour your request. Please note that we might ask you to provide evidence that you are the rightful requestor (i.e. that you are who you say you are). Also keep in mind that once we have deleted the data, we will not be able to restore it. So remember to save a copy of your collected consents before requesting the data be deleted.

We also kindly note that we will keep information about the fact that you have had an account with us, as we are legally obligated to do so. This includes information about the account owner.&#x20;

### I don't have a company, what should i put into the company info for my account.

If you don't have a company, but simply run a personal website, you simply input your personal information in stead of the company info.

## Technical

### How should I categorise cookies from the 3rd party widgets I use on my website, e.g. for contact forms, etc.?

When using 3rd party widgets, the process of categorising their cookies is similar to how you would normally categorise your cookies in your Openli dashboard. It is simply a matter of considering the purpose of each cookie from the third party widget and then categorising it accordingly. If a cookie from e.g. a contact-form widget is placed to prevent spam, then you would categorise it as a necessary cookie. If the cookie is used for tracking, then you would consider it an analytical cookie, and so on.

### What is local storage and session storage?

In short they are cookie-like objects that you need to be aware of.

Just like cookies they are small files that store data on your device about you and your behaviour on the internet.

They are important to know about, because they fall under the same legislation as cookies. The legislation basically cover all "cookie like objects" meaning anything that stores data about you and your browsing on the internet.

This means that when you put in the work to make your website compliant, you need to make sure that local storage and session storage is blocked until consent is given, just like cookies needs to be and categorised in the Openli app just like your cookies.

Local storage and session storage are set exactly the same way as cookies typically are, so blocking it is done the same way as well.

You can read about how you block cookies (and local storage and session storage) [manually here](https://docs.legalmonster.com/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies) or if it is set with Google Tag Manager (GTM) [you can read about it here.](https://docs.legalmonster.com/integrations/how-to-use-google-tag-manager-with-legal-monster/block-cookies-with-gtm)

### Does your software support the blocking of Facebook Pixels?

Yes, it does. If the widget is installed properly and our blocking software has been correctly enabled, then the Facebook Pixel cookies will be blocked until your users give their consent.

Please see our guide on [how to enable blocking](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies) and don’t hesitate to reach out to <hello@openli.com> if you need any additional help.

### When scanning my website, your software found fewer cookies than another scanner did. Why is that?

This discrepancy is because some scanners misleadingly call some data "cookies" and list them as such, when in fact they are not set as cookies at all. Our blocking technology still prevents data like this from being set, just like for cookies. Some of our customers choose to manually add cookies to represent this type of data, which is typically placed in a browser’s “LocalStorage” data area.

### Do you support Google Tag Manager?

Yes, we absolutely do. [See this guide](https://docs.openli.com/docs/legacy-integrations/how-to-use-google-tag-manager-with-legal-monster) on how to use Google Tag Manager with Openli.

## Legal&#x20;

### I don’t have a Cookie Policy. Can I get one from you?

Yes, you can. As part of our Cookie Business package, we supply a cookie policy that has been vetted locally in your country by one of our partnering law firms - ensuring that it complies with your local legislation as well as international laws. We make sure to update it whenever there are changes in policy, so you can spend your time and energy doing what you do best.

### **Why do I need a cookie policy? Isn’t my privacy policy enough?**

No, a cookie policy and a privacy policy are two very different legal documents. When having a website, you must make sure to have both - you can’t just use your privacy policy as your cookie policy, for instance.&#x20;

What applies to both your cookie policy and your privacy policy is that they must refer/link to each other and be equally available and accessible on your website.

If you don’t have a cookie policy or a privacy policy, we’d be very happy to help you out. Contact us at <hello@openli.com> or visit our pricing page (link to pricing page).

### I use a US provider that is not compliant with the EU privacy regulations. Should I address that in my cookie policy or in my privacy policy?

If your website uses technology from non-compliant providers, this would typically be something you address in your privacy policy. Since your cookie policy will always refer back to your company’s privacy policy, this is the more appropriate place to address the matter as it relates to both privacy matters and data storage in general.

### What is the difference between necessary vs. non-necessary cookies?

As part of setting up your cookie widget, you’ll be asked to sort your cookies into different categories.

There are different legal requirements for necessary and non-necessary cookies which is why we treat them differently in our solution. You’ll find that we separate our cookies into different provider categories, depending on whether they are necessary or non-necessary (e.g. marketing or analytical providers).

The main difference is that you don’t need to collect consent for necessary cookies and therefore can place them immediately. With non-necessary cookies, however, you have to block them until your users have given their consent.&#x20;

Necessary cookies:

Necessary cookies - also known as essential cookies - have to do with the core functionality of your website. You are not legally required to ask for consent before placing necessary cookies and they can therefore be placed as soon as the user lands on your website. These cookies are e.g. used to:

* Remember if someone has previously given cookie consent on the website.
* Remember the items a user has placed in the website shopping cart, so they’re still there when they go to checkout.
* Comply with security requirements related to an activity a user has requested, e.g. in connection with online banking services, etc.

Non-necessary cookies:

Non-necessary cookies are e.g. used to collect data on website traffic and usage, remember language or timezone settings, collect information on ad performance, etc.&#x20;

You are not allowed to place non-necessary cookies until your user has given explicit consent to them. In other words, these cookies must be blocked until consent has been collected. Examples of non-necessary are:

* Analytical cookies
* Marketing cookies
* Functional cookies
* Preference cookies
* Remarketing cookies
* Social media sharing cookies
* Cookies used to recognise a user when they return to your website so you can tailor the experience they receive.&#x20;

If you want more information on cookies or other compliance matters, visit the [Learning section on our website](https://www.legalmonster.com/learning/cookie-compliance).

### How often do we ask the same user for consent?

We ask once every 180 days when the Openli cookie expires. This is to make sure all consents are current for all users. \
\
We also ask for consent again if the user deletes their cookies or if they log in from a device they haven't used before.

### How long can I view my consent data history

As Openli is the data processor and you are the data controller we keep the audit trail / history of the specific consents for as long as you have a subscription with us. When you no longer are using our paid services, the data will be deleted after a specified period of time. \
\
During the contract period, you can at any point ask us to delete the consents. \
\
We are planning on introducing a data retention period for consents so they are automatically deleted after a specific duration.\
\
&#x20;Many countries have different requirements when it comes to the duration / data retention periods so which specific duration will be introduced hasn't been determined. We'll of course reach out to our customers before any period is introduced.


# IAB TCF v2.0

This page explains Openli's position regarding support for the Internet Advertising Bureau's (IAB) "Transparency Consent Framework" (TCF) version 2.0.

Openli have assessed the [IAB's TCF v2.0](https://iabeurope.eu/tcf-2-0/), and its technical requirements and approval process.

The TCF imposes [very strict requirements on the design and functionality](https://iabeurope.eu/iab-europe-transparency-consent-framework-policies/) ("UX") of cookie-consent widgets in order for these to be approved by the IAB, as well as how implementing organisations interact with advertising vendors. **Given the fast-moving, frequent changes to requirements in various jurisdictions around the world, the TCF's policies will not necessarily reflect the legal landscape.**

Openli's services regularly adapt to new guidelines and rulings issued by data-protection authorities, and implementing TCF v2.0 would significantly limit this.

Additionally, it is unclear whether Internet advertising will survive in its current form for much longer, given recent announcements [by Google](https://www.cnet.com/news/google-will-stop-selling-ads-based-on-tracked-individual-browsing-history/) and [by Apple](https://www.apple.com/newsroom/2021/01/data-privacy-day-at-apple-improving-transparency-and-empowering-users/).

Web browsers are generally moving towards [stricter privacy settings](https://techcrunch.com/2021/02/24/mozilla-beefs-up-anti-cross-site-tracking-as-chrome-still-lags-on-privacy/) and [blocking of third-party cookies](https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/), and data-protection authorities are regularly issuing updated guidelines and rulings. The IAB [acknowledge this problem themselves](https://iabtechlab.com/safari-response/).

In light of the above, Openli does not support IAB TCF in its current form. However, we will continue to follow the development of the IAB's framework, and the surrounding legal landscape.


# How to create your privacy profile

Learn how to create your privacy profile, and about the information needed

In Openli, you have the ability to create your customer-facing privacy profiles.

Go to [your account](https://app.openli.com/), click “Trust Center” and then click “Create privacy profile”. You can now create your privacy profile.

This profile focuses on providing your customers with information about your customer-facing privacy efforts.

When you create your profile, you’ll be asked to outline and upload relevant privacy information and documentation so your customers and users can see your privacy and security efforts.&#x20;

Your customer-facing privacy profile should include information like:

* Full company name and address
* A description of your service / offering&#x20;
* Contact details, including an email address so people can easily get in touch with you
* A link to your privacy policy&#x20;
* Information about the personal data you’re processing on behalf of your customers or users, incl. Personal data, data subjects, purpose and nature of processing&#x20;
* A copy of your standard data processing agreement (if you are a data processor) with your customers. If you don’t have a standard data processing agreement in place, we need you to provide an explanation as to why you don’t have one in place. This can e.g. be due to you being a controller or a consultancy where bespoke data processing agreements are entered into for which reason you can’t provide a standard template. &#x20;
* Information about your security efforts&#x20;
* Your sub processor list (if you are a data processor). If you don’t have sub processors, provide an explanation as to why you don't use sub processors.
* Data retention and deletion policy
* Where personal data is processed by your company (your processing locations) and the processing locations of your sub processors. If you aren’t able to disclose this information, please provide an explanation as to why you can’t provide the information
* If you’re transferring data out of the EU, add information about the legal basis you use for the data transfers, e.g. EU SCCs, the EU and US Data Privacy Framework etc.

If you state that you have security certificates in place, please provide a copy of the certificates or a letter from your auditor confirming the certificate in place.

Please note that Openli does not perform a legal review of the documentation and that it is not an audit. Openli checks that the information requested is provided, e.g. that a SOC 2 is uploaded, but we cannot and does not verify the validity of the documentation. This is the sole responsibility of the company creating the profile.


# How can I get an Openli Privacy Badge?

Related to privacy badges & pages

In this article we will explain the steps you need to complete to get Openli’s Privacy Badge.&#x20;

The first step [is to go to this page and request access](https://openli.com/claim-offer-privacy-pages-badges) to Privacy Badges & Pages as part of your subscription with Openli.

Fill out the form and after that, you’ll be able to see the functionality enabled in your account.&#x20;

The next step is then to complete your privacy profile. See [this article for how to create your privacy profile](https://docs.openli.com/docs/privacy-hub/how-to-create-your-privacy-profile) and the information needed.&#x20;

After that, you will need to publish your profile so you are transparent about your privacy efforts.&#x20;

Your published privacy page needs to contain some core information before a privacy badge is enabled in your account:

* Full company name and address
* A description of your service / offering&#x20;
* Contact details, including an email address so people can easily get in touch with you
* A link to your privacy policy&#x20;
* A copy of your standard data processing agreement (if you are a data processor) with your customers. If you don’t have a standard data processing agreement, we need an explanation as to why you don’t have one in place. &#x20;
* Information about your security efforts\* or a link to information&#x20;
* Your sub processor list (if you are a data processor). If you don’t have sub processors or a specific list, provide an explanation as to why you don't.
* The processing locations by your company and the processing locations of your sub processors. If you aren’t able to disclose this information, provide an explanation as to why you can’t provide the information.
* If you’re transferring data out of the EU, information about the legal basis you use for the data transfers, eg. EU SCCs, the EU and US Data Privacy Framework etc.

If/when a privacy badge is enabled, you’ll receive an email and you'll be able to find it in your account under “Share”.&#x20;

\* It's not a requirement that you have a security certificate, but if you do provide a copy of the certificate(s) or a letter from your auditor confirming the certificate in place. Other types of security information can include security policy, whitepapers and similar.

Please note that Openli does not perform a legal review of the documentation and that it is not an audit. Openli checks that the information requested is provided, e.g. that a SOC 2 is uploaded, but we cannot and do not verify the validity of the documentation. This is the sole responsibility of the company creating the profile and it is also the company that is responsible for keeping the profile up to date.


# Create and manage a DPA

In this guide we'll look at how to create a DPA in the Openli app and how you can easily use tags to import Subprocessors and Personal Data information.

{% hint style="info" %}
This feature requires a Vendor Hub subscription with Openli.\
\
Contact <hello@openli.com> or visit our [website](https://openli.com/products/vendors) for more information on the Vendor Hub product
{% endhint %}

### How to Create an Agreement.

The first thing you need to do is create an agreement. In the Openli app, an agreement is simply a document, which you can update and manage from one place. Each agreement has a Public Key, which allows you to refer to and embed the policy in it's latest revision, making sure that when you update it in Openli, it is also updated all the places you have embedded it.

To get started with you DPA agreement, you need to go to [your openli app](https://app.openli.com).\
Find the agreements section in the side menu on the left. \
\
Click the *New agreement* button in the top right corner and choose *Data Processing Agreement* In the drop down.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FOmYQm4fEYwHvimwD6dmU%2FScreenshot%202021-12-17%20at%2014.34.57.png?alt=media\&token=ee715b7a-488d-4661-9742-9c0915d1db73)

This takes you to the document editor. \
Here you can insert your DPA or use tags as explained further down in this guide.\
Once you are done click *Preview*

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F4kiW012TSNIikqwn17P1%2FScreenshot%202021-12-17%20at%2014.46.11.png?alt=media\&token=880bd655-f03a-4e39-b501-1ab38ac94f17)

This takes you to the preview page. Here you can see how it including any info pulled in via *tags.* If you want to edit more, click *edit.* Otherwise click *publish* to publish the agreement making it available for embedding.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FGAleQ3bjoQMWr2tQOXWd%2FScreenshot%202021-12-17%20at%2014.46.20.png?alt=media\&token=7cda7bf4-aa02-417f-95fe-e40cf5a37097)

Once published you can find it in your agreements section with all your other policies.\
Note that you can always find the agreements public key in this list as well.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FsrQgVcXxaZKg13qKfPEB%2FScreenshot%202021-12-17%20at%2014.53.36.png?alt=media\&token=1b407651-fc56-4c48-ac56-8cedc6fcb4a2)

### Using tags to embed lists of Subprocessors and Personal Data information.

Openli allows you to pull lists of your subprocessors and lists of the personal data you process into your DPA.

These lists can be limited just to one of your services or they can cover all the services you offer.\
\
Simply add the tags listed below in your policy where you want the list to appear and save it. \
\
Currently there are four tags available:

<table><thead><tr><th width="445"></th><th></th></tr></thead><tbody><tr><td>Tags</td><td>Result</td></tr><tr><td><code>{{ </code><em><code>service_name</code></em><code>.subprocessors_list }}</code></td><td>Creates a list of subprocessors for the service you have specified; the "service_name" part varies.</td></tr><tr><td><code>{{ </code><em><code>service_name</code></em><code>.personal_data_list }}</code></td><td>Creates a list of the data processed by the service you have specified; the "service_name" part varies.</td></tr><tr><td><code>[[LIST_SUBPROCESSORS]]</code></td><td>Creates a list of the subprocessors for all your services</td></tr><tr><td><code>[[LIST_PERSONALDATA]]</code></td><td>Creates a list of the data processed by all your services</td></tr></tbody></table>

The tags for specific services you offer can be accessed via a dropdown:

<figure><img src="https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FBQmIOuNcFL7cdNuqVc7m%2FScreenshot%202023-08-03%20at%2016.29.39.png?alt=media&amp;token=cff23997-89e5-4189-bfb9-d79b7da789f7" alt=""><figcaption></figcaption></figure>

The "service\_name" in the tag will be a simplified version of your service's name. For example, "Openli Vendor Hub" would appear in the tag as "openli\_vendor\_hub".

If you would like to create lists for all your services you can use the tags as shown below:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FiYIGQaBZU2JSQVpNxfAQ%2FScreenshot%202021-12-17%20at%2015.06.45.png?alt=media\&token=6e2470f1-a5c9-4117-a531-4117ab6fd4de)

### Editing your Agreement

Once you have an agreement up and running, you can edit it if any changes should be necessary.\
\
To do so go to *agreements* to find you list of policies. \
\
Then click the name of the policy.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FR1ebI8djZcGUa05AoQ8F%2FScreenshot%202021-12-20%20at%2014.18.31.png?alt=media\&token=39cd461a-14ba-42dd-beeb-d7a87335c536)

Once here you can see a list of the previous drafts, and in the very top you'll find the current version. Click *update* next to the current version.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F2JFV2FzszTVR5LS64OsN%2FScreenshot%202021-12-20%20at%2014.19.49.png?alt=media\&token=bafa41ec-a8fe-45f5-acdf-cac5c453b471)

Now you'll be in the agreement editor, where you can update the agreement to you needs. When you're done click *preview* to preview the edits.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FO38YwQUFeRa7NHZrW5fA%2FScreenshot%202021-12-20%20at%2014.27.20.png?alt=media\&token=d6b2f44a-46df-4214-99dd-37e1d8030c6e)

If you are happy with the changes you see in the preview, you click *publish*, and your DPA is now updated with your latest changes.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F84QKAS2ZAEnfJA7gzoV3%2FScreenshot%202021-12-20%20at%2014.20.22.png?alt=media\&token=840b7736-bb53-4ac3-ac59-8cda4b19e4b5)

Remember that you can always return ti the agreements revision page to see all revisions you have made.

### Embedding Agreements

To Embed agreements you need to follow this guide if you are already using our cookie widget:

{% content-ref url="/pages/-MLl\_\_Ep6EuRC0ymNegg" %}
[Embed your policies and legal agreements](https://docs.openli.com/docs/policy-and-agreement-management/embed-your-policies-and-legal-agreements)
{% endcontent-ref %}

If you do not have a widget live on your website you need to follow this guide in stead:

{% content-ref url="/pages/Hcvb7mun1sZkeupcuWOb" %}
[Embedding agreements without displaying a widget](https://docs.openli.com/docs/policy-and-agreement-management/embed-your-policies-and-legal-agreements/embedding-agreements-without-displaying-a-widget)
{% endcontent-ref %}


# Vendor owners

In this article we talk about how you can assign owners to vendors and why this is useful.

### Why should you assign owners to your vendors

Assigning an owner to each vendor makes it much easier to manager your vendors. It will allow you to always have an overview of who is responsible for the different contracts your company has with vendors and makes it easy for you to make sure they get the right tools and help regarding contracts and vendors if necessary.

### How to assign Owners

It's really simple to assign owners. Simply go to a vendor page and click the *Assign owner* button in the right side of the vendor info box.\
\
This brings up a list of existing owners as well as the option to invite a new owner:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FHtLIxiJBYfJJTHRxFuoH%2FScreenshot%202022-07-13%20at%2009.03.48.png?alt=media\&token=cb8d4c8c-0efe-479c-a652-08985764cb99)

{% hint style="info" %}
Note that if you add a new employee to be vendor owner, the person will get an invite to become a user on your Openli account. \
They will receive an email prompting them to log in and make a password. \
It is important that they do so, so they can see and manage the vendors they own.
{% endhint %}

#### Assigning a new owner

You can at any time assign a new owner to a vendor that already has an owner. Doing so will move the ownership of the vendor to the new owner, as a vendor can only ever have one owner at a time.\
\
To do so, simply click the button with the current owners name to bring up the owner menu and select or invite a new owner as described above:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FN4FTB5rurE2Qay2bVA29%2FScreenshot%202022-07-13%20at%2009.12.20.png?alt=media\&token=033aa56a-a757-4e7e-8c2b-b345fa7e4294)

### How to use owners as a search facet

So now you've assigned owners for all your vendors. How do you then find vendors based on owners? \
\
The answer is our faceted vendor search.\
\
Simply go to the vendor overview page by clicking *Vendors* in the side menu.\
Once in the page you can find the *owner* filter in the right side of the page:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fb3kKkkt1weQyEWugpz5q%2FScreenshot%202022-07-13%20at%2009.18.57.png?alt=media\&token=227bd89f-d83f-4294-9b26-c05f9587f303)

Click the owner you want to see the results from and the page will the refine any search to only include results with this particular owner:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F26xI4KKGc8i5oFOepVY0%2FScreenshot%202022-07-13%20at%2009.21.55.png?alt=media\&token=37d4252b-2a18-49ab-9086-7fb911fee18d)

That's it. \
\
remember that you can add as many owners as you need. This is an easy way of improving your vendor management by giving you the knowledge of who is managing what in your organisation.


# Why are custom properties on vendors super valuable?

This article goes through why custom properties for your vendors are useful and how you can use them to your advantage.

### What are custom properties and why do I need them?

Properties are a great way to keep a better track of your vendors, who use them and how they are used. They also provide a great search point for when you need to find specific vendor groups.\
\
To help make it more clear, this article has a few examples of properties and how they can make your lives easier. \
\
If you prefer to just get started making properties, [go to this guide](https://docs.openli.com/docs/privacy-hub/setting-up-custom-properties) for a "how to".

#### "Department" or "Subsidiary" properties

Using the department property, you can mark up which departments use or have ownership of a specific vendor. For example you can register that marketing is the main user of the vendor Google and finance is the main user/owner of the vendor Pleo. \
\
A subsidiary property could help you keep track of vendors only used in certain branches of your organisation. Lets say your company has branches in Germany, Denmark and France. Maybe the French branch uses vendors that are exclusive to their branch. This will help you keep track of those vendors.\
\
This makes it easy for you to keep track of where the different vendors belong and how they are used in your organisation.

#### &#x20;"In Use" and "Autorenewed" properties

As simple as they sound. A Yes/No property that tells you if the vendor is still in use or if it an old vendor you are not using anymore. It could also tell you if a vendors contract autorenews or if it needs to be renewed manually. \
\
This is helpful for basic vendor management ensuring you have the information on active and inactive vendors alike and that you know which ones you need to keep an eye on.

#### Contract value

Contract value could be set as a number based property representing the price of the vendors services, for example: *up to 5.000*, *5.000-10.000* and *above 10.000*.\
\
This would allow you to easily keep an eye on what vendors are have the higher cost allowing you to know where you might be able to cut costs by looking for a cheaper service or a better deal.

Furthermore in conjunction with a dept. property, you could even keep an eye on what departments are spending the most on services and better guide them to cheaper alternatives.

#### "Company Critical" property

Is this vendor company critical, Yes or No. Again a simple property which would allow you to determine easily which vendors provide company vital services that potentially could cause service breakdowns etc. if the service stopped working as opposed to vendors providing services where the company could go on for a while if the service broke down. \
\
This will allow you to keep an eye on how many vendors your ompany are vitally reliant on to be stable and take action accordingly if that number of companies is unreasonably high.

### One last piece of advise

The important thing to remember here is that the only thing limiting your custom properties is your own imagination. You can set up whatever properties you need and use them as sorting tools and search facets making your vendor management much more easy to keep track of.


# Setting up custom properties

In this guide we show you how to setup your own Custom properties in the Privacy Hub

### How to build your own custom properties:

Setting up Custom Properties in Openli is fairly easy and the opportunities with this feature are endless. For inspiration on how to use custom properties, [see this article](https://docs.openli.com/docs/privacy-hub/why-are-custom-properties-on-vendors-super-valuable) with ideas and examples.

first, you need to log in to your openli account on [app.openli.com](https://app.openli.com)

Once there, click *Vendors* in the side menu on the left. This brings you to your list of vendors.\
\
Click the name of any vendor (don't worry, the propeties you add will be accessible on all vendors, so it doesn't matter which one):

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FWr6Dn7fRhesIGkQlkLhT%2FScreenshot%202022-07-12%20at%2013.47.29.png?alt=media\&token=41c98a81-1819-48b5-8e23-0db7c9577307)

Once in the vendor page, click *Property settings* to go the property management page:n here you can add

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F9upjuy9sjg5JT0EtOQZK%2FScreenshot%202022-07-12%20at%2013.49.13.png?alt=media\&token=b3528e77-10b2-4bea-a734-4469753d8176)

In there you can add any property you want, just fill in the name of the property and click add:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FvXASjIqIvMrUyivFhxVH%2FScreenshot%202022-07-12%20at%2013.50.03.png?alt=media\&token=3e14fb05-61cd-4796-b2d9-6d6cafa6d05a)

Once the property is added, yuou can easily add anyoptions orelevant to that property by tying the name of the option and clicking ad next to it to add the option to your new property:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FU9BpNHFVunSeP7xTn9I9%2FScreenshot%202022-07-12%20at%2013.53.04.png?alt=media\&token=ead03794-4bb1-4e85-b02f-695a449e2831)

Once you click *add* you have added the option and it should be ready to use in your vendor list under each vendor you have. \
\
To activate the property, simply click it in the page and set the relevant option for the property and vendor. Once this is done the property is live and active.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FbSpohszCPPh72BQwM86O%2FScreenshot%202022-07-12%20at%2014.06.35.png?alt=media\&token=b2f3ee05-77b7-4f85-9c40-9a1ddf3889f0)

It'll even be available as a search facet as soon as you have set it with an option on any vendor in your library:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F1dMzzA68g3DJ1YqpgSda%2FScreenshot%202022-07-12%20at%2014.05.45.png?alt=media\&token=ae5ea331-578e-47af-9892-afdb0b329606)

That's it. Your done and can now go on and make all the properties that your heart desires.\
\
A word of caution though: Remember to use them wisely though. It is a powerful management tool that will help you keep track of everything, but if you add too many properties you can end up making it more confusing than necessary. \
Don't forget to manage your properties as well as your vendors to keep everything nice and neat. This will make your life much easier in the long run :)


# Tasks

## Getting Started with Tasks in Openli

Tasks in Openli help you manage your privacy and compliance work in one place. It also gives you a clear overview of what needs to be done, who is responsible, and when it’s due.

### With Tasks, you can:

✅ Create and assign tasks for your privacy program

📅 Set deadlines and assign task owners

👀 Track progress and mark tasks as completed

### Examples of common tasks:

✅ Add your data processors to Openli

✅ Review and update your Privacy Policy

✅ Confirm you have signed DPAs with key vendors

✅ Update your RoPA (Record of Processing Activities)

✅ Set a reminder to review data retention timelines

✅ Schedule a check-in to review use of AI tools

<br>

## **How to Create a Task in Openli (Step-by-Step)**

1. **Navigate to Tasks**

&#x20;  In your Openli account, click on the "Tasks" tab in the left-hand menu.

2. **Click "Create Task"**

&#x20;  Enter a task title, description (optional), and due date.

3. **Assign an Owner**

&#x20; Select the person responsible for completing the task.<br>

* If the person does not have an Openli account, you can invite them at the same time.
* If the person already has an account, they will receive a notification that a task has been assigned to them.

4. **Automatic Notifications**

The task owner will get a reminder notification on the task due date, helping to ensure nothing slips through the cracks.

5. **Mark as Completed**

Once the task is done, it can be easily marked as “Completed” to keep your dashboard up to date.

<br>

**Need Help?**

If you have questions or feedback, we’d love to hear from you. Reach out to us at <success@openli.com>.

<br>

<br>


# Quickstart

This simple guide shows you how to get started with Openli and become a better data citizen. Once you've completed this guide, you'll be ready to collect compliant cookie consent.

## Demo

Watch this 6-minute video for a tour of the cookie consent solution.&#x20;

{% embed url="<https://www.loom.com/share/343c09d4ddd0482a941ed9ddf39e1cbf>" %}

## Step 1: **Add domain to scan for cookies**

You must add a domain(s) if you haven't already during sign-up. You can add multiple domains that you would like Ope to scan for cookies.&#x20;

To add a domain simply go to "**Settings**" in the Openli dashboard (bottom left corner), and select the project in which you wish to add your cookie widget.&#x20;

{% hint style="warning" %}
**You must remove** any existing cookie-blockers/cookie-banners **before** adding your domain, so that our first scan can detect your cookies properly.
{% endhint %}

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fd2CvMIfk6xnFOwXluhCv%2FScreenshot%202021-11-22%20at%2009.15.41.png?alt=media\&token=01f0c4e6-ae76-4bdd-9b16-7cc3ae6c822e)

If you wish to manually add your cookies instead, you can follow this guide that shows you h[ow to manually add any cookies](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-manually-add-any-cookies).

## Step 2: Create your cookie providers

After an initial scan of your website you'll see an overview of the cookies found on your domain. You need to create your [cookie providers](https://www.legalmonster.com/learning/cookie-compliance#cookie-providers) to be able to categorise your cookies.

In the Openli dashboard, click on “**Cookies**” and then “**Add new cookie provider**”. Each cookie provider belongs to a category, and you must select only one. Make sure to choose [the correct category for your provider.](https://www.legalmonster.com/learning/cookie-compliance#necessary-and-non-necessary-cookies)&#x20;

Afterwards, fill in the following fields:&#x20;

1. The name of the cookie provider, e.g. Openli
2. The purpose of the provider&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FF46NGJEaefvsKZe6cWCk%2FScreenshot%202021-11-22%20at%2009.08.46.png?alt=media\&token=6a03fb05-17e2-4cef-90df-01505c726b12)

Finally, click on the green “Save cookie provider” button and repeat this step for all your providers.&#x20;

## Step 3: Categorise your cookies

Openli scans your website for cookies, however, you must select which provider sets a specific cookie and thereby which category that cookie belongs to.&#x20;

{% hint style="info" %}
Cookies can either be in the categorised as *necessary*, *analytical* or *marketing cookies*. You define the cookie category via the cookie provider. This determines how the consent is collected, and whether you need to obtain consent from the website visitor before cookies can be set.
{% endhint %}

In the Openli dashboard, click on “**Cookies**” . If you have any uncategorised cookies, Openli asks you to categorise them immediately. Click on "Categorise your cookies".

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FMdWEQhyvTXDEN9dXXOSV%2FScreenshot%202021-11-22%20at%2009.11.06.png?alt=media\&token=caa0ad5c-119b-4640-a1b4-9998caf598bc)

For each cookie, you must click on the dropdown menu “**Select provider**” and choose the correct provider for that cookie or add a new provider if needed.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FEHXx0qmb3l4MRk6eIGVw%2FScreenshot%202021-11-22%20at%2009.24.36.png?alt=media\&token=163a1742-0ae9-4582-b710-5c2f636a3df7)

Do this for every uncategorised cookie.&#x20;

## Step 4: Add your cookie policy

You must have a cookie policy that your visitors can read when they accept cookies. This is how it looks in the Openli widget:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fs8vY8jMb92PPCuo6r3GL%2FScreenshot%202021-11-22%20at%2009.26.31.png?alt=media\&token=65845af2-0185-478d-8b49-0c0bffbff3ac)

To create your first cookie policy, click on "**Agreements**" in the Openli dashboard. Click on "New agreement" and select cookie policy. Give your agreement a title and save it. Next you must write your policy.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FgxVcdJar18oVxEApBqRg%2FScreenshot%202021-11-22%20at%2009.34.20.png?alt=media\&token=e9d46c94-d5a8-4558-8a15-dcc1c1ee28ea)

Save your draft. You're asked to write a few notes on why you're creating/changing this policy. Add a few thoughts and click "Save Notes". If you're ready to publish your draft, click on "Publish now!" and confirm by clicking on "OK".&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fx9znFe7VQkO9oELuGBk7%2FScreenshot%202021-11-22%20at%2009.38.33.png?alt=media\&token=84f82d8e-9cd6-4cda-ad15-d0616ef022e2)

If you already have a cookie policy, but wish to make changes to the text, you can do so by:

1. Clicking on the name of the cookie policy in the overview&#x20;
2. Click on “Update agreement”&#x20;
3. Make the relevant changes in the text box
4. Click on the button “Save draft”
5. Write about which changes you made in the notes box (for your records)
6. Click on “ Save notes”
7. If you are ready to publish the changes click on “Publish now!”
8. Confirm by clicking on “OK”

{% hint style="info" %}
Openli automatically updates your cookie policy and widget when you add new cookies or create new cookie providers if [you use our tags.](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy#tags)
{% endhint %}

## Step 5: Block the cookies on your website

Our cookie widget blocks the cookies that you need consent before setting, until the website visitor gives consent.

Our cookie widget currently uses manual categorisation to properly block cookies that are set on your website. You must make changes to your HTML to enable blocking, and for it to work properly. You can read more in [this section of our developer documentation](https://docs.legalmonster.com/legaljs/collecting-cookie-consent#adding-the-cookie-consent-widget-to-your-site).

{% hint style="danger" %}
You will need to repeat this step if you get new cookie providers and add them to your account.
{% endhint %}

## Step 6: Install the cookie widget on your website

{% hint style="warning" %}
The rest of this guide is for customers with their own developed website. **If your website is based on WordPress, Squarespace, Wix, or a similar website-builder,** please see the separate guides in the menu on the left to find out how to install your widget.
{% endhint %}

In this final step, you'll install the widget on your website. You'll need your widget's JavaScript code snippet to do so.&#x20;

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
Notice that the value for `widgetPublicKey` will be different in your code snippet
{% endhint %}

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 [this section of our developer documentation](https://docs.legalmonster.com/legaljs/collecting-cookie-consent#adding-the-cookie-consent-widget-to-your-site).

The snippet must be included **immediately before the closing-tag of the `body` element in your site's main template**, like this:

```javascript
...
    ...
        <script>
            !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonsterl.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonsten","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();
        
            legal.widget({
                type: "cookie",
                widgetPublicKey: "xxxxxxxxxxxxxxxxx",
            });
        </script>
    </body>
</html>
```

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. [This reference article](https://javascript.info/onload-ondomcontentloaded) provides a good overview of the events involved. Contact us if you are in doubt.

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Checklist: Cookies

Use this checklist to ensure a smooth transition when taking your integration live.

Ready to go live with your Op setup? This checklist provides you with an overview of what items must be ready before you go live.

### :white\_check\_mark: Agreements all set and published

Most importantly, your agreements must be complete and published. For example, users need to be able to read your cookie policy and privacy policy, when they consent to your cookies.&#x20;

**Make sure you have:**

* [ ] A Privacy Policy
* [ ] A Cookie Policy
* [ ] A Terms of Service Policy, *if you use our widgets for consent and signup*

### :white\_check\_mark: Correctly configure your widgets&#x20;

Each widget must be correctly configured to be legally compliant. Make sure that your widgets are configured as intended:

* [ ] Make sure that your audience is correctly set - business or consumer
* [ ] Your widget is connected to the correct agreements.&#x20;
* [ ] [All cookies are categorised](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-3-categorise-your-cookies) for your cookie widget

These are legally binding, so make sure that your agreements are paired correctly with your widgets for signup, marketing and/or cookies. For instance, if you have a "*Signup for a service*"-widget, you'll need to include both a privacy policy and your terms of service.&#x20;

### :white\_check\_mark: Installed widgets on your website

The widgets need to be installed correctly. We highly recommend adding some UI test to your test suite to make sure, that the widgets are shown and working.&#x20;

Follow our technical documentation to [install the widgets properly](https://docs.openli.com/docs/documentation/legaljs-widget#setup).&#x20;

* [ ] Cookie widget is shown on the first visit to your site
* [ ] Sign-up consent is shown when users sign up
* [ ] Email-marketing consent is shown when users signup for your newsletter

### :white\_check\_mark: Blocked cookies on your website

For your Openli integration to be compliant, you must block any non-necessary cookies *until* the user has given consent. Make sure that no cookies are set on your page when users first visit and have not yet given consent. We have written a small guide on [how to block third-party cookies](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies) in our technical documentation. We also have a [guide if you are using GTM to insert all your scripts.](https://docs.legalmonster.com/integrations/how-to-use-google-tag-manager-with-legal-monster/block-cookies-with-gtm)&#x20;

### :white\_check\_mark: Customise your cookie widget

Our widgets support different languages and jurisdictions. You should select the option that is relevant for your website.&#x20;

{% hint style="info" %}
If you do not specify a language, or if the language you set is not supported by us **in the visitor's jurisdiction**, English will be used.
{% endhint %}

You can see all the supported languages in [this table here](https://docs.legalmonster.com/legaljs/collecting-cookie-consent/cookie-widget-options#setting-the-display-language).&#x20;

If you are on one of our [paid plans](https://www.legalmonster.com/pricing), you have the option to customise the styling of our cookie widget. This includes changing the button colours and using a link instead of a shield to access cookie settings. You can find all the options, and how to customise i[n this guide](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/cookie-widget-options).&#x20;

## :tada: Go live!

Ready, set, go! You're now ready to become a platinum data citizen. Forgot worrying about legal compliance, and know that our privacy mascot's Sven is taking care of everything for you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FZjwdCELvoX5qm4reRBLV%2Fconnect-openli.png?alt=media\&token=1d0809ba-fae0-47b0-b865-9cb22528dc75)


# Cookie widget

Here you'll find an overview of all our guides to the Openli Cookie Widget.

{% content-ref url="/pages/-MGbePscdbCbjeP0UDHy" %}
[Create a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)
{% endcontent-ref %}

{% content-ref url="/pages/-MG3Xn4lnObmlbY57veO" %}
[Create a cookie widget](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget)
{% endcontent-ref %}

{% content-ref url="/pages/-MG7xkl\_awcA5Je1CEp0" %}
[Manually add any cookies](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-manually-add-any-cookies)
{% endcontent-ref %}


# Create a cookie policy

This guide show you how to create a cookie policy and use built-in features to keep your policy up-to-date automatically!

{% embed url="<https://www.loom.com/share/392016a2d11c41199078baf352bed2b1>" %}

You must have a cookie policy that your visitors can read when they accept cookies. This is how it looks in the Openli widget:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fs8vY8jMb92PPCuo6r3GL%2FScreenshot%202021-11-22%20at%2009.26.31.png?alt=media\&token=65845af2-0185-478d-8b49-0c0bffbff3ac)

## Before you start

Before following these steps, please be sure that you have:

1. [Added your website's URL (*either during the signup process or in the settings page*)](https://docs.openli.com/docs/general-openli-guides/add-your-website)
2. [Created cookie providers and categorised all cookies](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-2-create-your-cookie-providers)

## Step 1: Create an agreement

To create your first cookie policy, click on "**Agreements**" in the Openli dashboard. Click on "New agreement" and select cookie policy. Give your agreement a title and save it.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F33OPOHZVWXaq60xiQNtF%2FScreenshot%202021-11-22%20at%2009.43.11.png?alt=media\&token=0a5914d9-a9bc-46a0-8c46-66c17fa00a48)

## Step 2: Fill out your agreement

Once you have created your agreement, you are asked to fill out the policy.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FVcDC86F9s5WmRGfRlffA%2FScreenshot%202021-11-22%20at%2009.44.04.png?alt=media\&token=29da430b-bba7-41d4-9d1b-b02dd4a5bfc2)

{% hint style="danger" %}
Your privacy policy [must include certain sections](https://www.legalmonster.com/learning/cookie-compliance#what-you-need-to-include-in-your-cookie-policy) according to the law. &#x20;
{% endhint %}

When you fill out the policy, you can use our **tags** for describing your cookie providers.&#x20;

We highly recommend that you do so, as Openli will *automatically* update your policy. Scanning for cookies, adding, editing or deleting a cookie provider or adding a cookie to a provider will create a new revision of all cookie policies on a given project.

#### Tags

| Tag                            | Description                                                                                               |
| ------------------------------ | --------------------------------------------------------------------------------------------------------- |
| `[[LIST_NECESSARY_PROVIDERS]]` | This tag will show a table of your necessary cookie providers and the cookies that they set on your site. |
| `[[LIST_ANALYTICS_PROVIDERS]]` | This tag will show a table of your analytics cookie providers and the cookies that they set on your site. |
| `[[LIST_MARKETING_PROVIDERS]]` | This tag will show a table of your marketing cookie providers and the cookies that they set on your site. |

If you use the tags above, Openli generates a table that lists all of your providers within the specified category.&#x20;

Once you are satisfied with your policy, you can save it by clicking the green button "Save Draft". When you save your draft, you are asked to provide some editorial notes, so you'll have a revision trail.&#x20;

## Step 3: Publish your policy

If you're finished with your draft, you can publish it. When you publish your draft, it is live in your widgets and new users will consent to the new version of your cookie policy.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fx9znFe7VQkO9oELuGBk7%2FScreenshot%202021-11-22%20at%2009.38.33.png?alt=media\&token=84f82d8e-9cd6-4cda-ad15-d0616ef022e2)

If you wish to update your policy in the future, you can press "Update agreement" to create a new revision of your cookie policy.&#x20;

## Done

Congratulations on completing your first step towards collecting compliant cookie consent. Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Create a cookie widget

This guide will show you how to create a cookie widget, which you can install on your website to collect compliant consent with Openli.

## Before you start

Before following these steps, please be sure that you have:

1. Added your website's URL (*either during the signup process or in the settings page*)
2. [Created a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)

## Step 1: Creating the widget

Creating the widget is simple and quick. Simply go to your Openli dashboard and select "**Widgets"** from the side menu. Once your on our widgets page click the "New widget"-bottom.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fo9H1tUgdGScXMNCyaaUq%2FScreenshot%202021-11-22%20at%2009.56.50.png?alt=media\&token=25ba2ed1-23c8-4325-a938-c66328061f8a)

From the overview select Cookie consent to get started:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F7WOi7i5GrJGXdoSgbaec%2FScreenshot%202021-11-22%20at%2009.57.54.png?alt=media\&token=fca64d3a-1588-43ee-b717-14f10a38e4cc)

## Step 2: Configuring your widget

Each cookie widget must have an assigned cookie policy. Select the policy that you've created for your cookie widget. If you only have one cookie policy, the widget will automatically use it.&#x20;

Openli provides you with a different set of options to customise your widget.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FMD76yHtVChJ30s9du6eX%2FScreenshot%202021-11-22%20at%2010.03.27.png?alt=media\&token=a61e836f-aabe-4317-8d06-391748bad50f)

## Step 3: Done!

That's it! You've now created your cookie consent widgets, ready to be installed on your website.&#x20;

{% hint style="warning" %}
Note that the default language for the widget is English.\
[To change the language of the widget follow this guide.](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/setup-widget-language)
{% endhint %}

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FTtCkkSmgZUB8Qet5xrY3%2FScreenshot%202021-11-22%20at%2010.05.07.png?alt=media\&token=66aa22db-4acd-4727-96c5-c1d2ed3252bd)


# Install the widget

This guide will show you how to install your cookie widget.

{% embed url="<https://www.loom.com/share/c9adfa4a4c414c41bb99f0d9e6425c5f>" %}

## Install the cookie widget in your source code

In this final step, you'll install the widget on your website. You'll need your widget's JavaScript code snippet to do so.&#x20;

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
Notice that the value for `widgetPublicKey` will be different in your code snippet
{% endhint %}

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 [this section of our developer documentation](https://docs.legalmonster.com/legaljs/collecting-cookie-consent#adding-the-cookie-consent-widget-to-your-site).

The snippet must be included **immediately before the closing-tag of the `body` element in your site's main template**, like this:

```javascript
...
    ...
        <script>
            !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();
        
            legal.widget({
                type: "cookie",
                widgetPublicKey: "xxxxxxxxxxxxxxxxx",
            });
        </script>
    </body>
</html>
```

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. [This reference article](https://javascript.info/onload-ondomcontentloaded) provides a good overview of the events involved. Contact us if you are in doubt.


# Manually add any cookies

If you want to manually add any cookies to your account, instead of waiting for them to be found via a scan or if some cookies are missing, you can do so through the following simple steps.

{% embed url="<https://personal.twentythree.com/personal/74753247/313a62b1d1f1f91cdec5b2dcd6e3ae28>" %}
Short Video guide on adding cookies manually to Openli
{% endembed %}

## Step 1: Add cookie

Select on "**Cookies**" in the Openli dashboard, and click on the "Add cookie" button.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FFNU7ZY8fZscYaUfLHi3T%2FScreenshot%202021-11-22%20at%2010.06.24.png?alt=media\&token=1a9d97d3-cedb-463f-86fd-bd18ea88a11e)

Fill out the required fields. Remember to select the correct domain, and write the name of the cookie you want to add (*this must be the technical name of the cookie when it is placed in the browser*).&#x20;

1. Select the correct domain&#x20;
2. Write the name of the cookie you want to add - this must be the technical name of the cookie when it is placed in the browser
3. Add the information about which domain hosts the cookie &#x20;
4. Select the amount of days before the cookie expires&#x20;
5. Select the correct cookie provider from the drop down menu, or add a new provider if you cannot find the correct cookie provider in the menu&#x20;
6. Click on the green button “Save cookie”&#x20;


# Customise your widget

This guide shows you how you can customise your widget to give it the look and feel of your own brand and website.

## Video

{% embed url="<https://www.loom.com/share/a6f8e684149a429aa5f806e5497f45a1>" %}

## Widget settings

Depending on your Openli plan you'll have different styling options available in your Openli dashboard.&#x20;

Go to "Widgets" and select your cookie widget. Click on "Edit widget" to access the customisation options.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F4Wc99EZGPUzgl2HyyE0f%2FScreenshot%202021-11-22%20at%2010.03.27.png?alt=media\&token=29e774b8-3616-47ab-9bee-34aa46b194a8)

You'll have several options to style your widget to your liking in the side menu.

## Integration styling

### Setting the display language

The cookie widget currently supports these languages, in the given jurisdictions:

| Language       | Supported in jurisdiction | Option value     |
| -------------- | ------------------------- | ---------------- |
| English (EN)   | All jurisdictions         | None, or `en-us` |
| Danish (DA)    | Denmark (DK)              | `da-dk`          |
| Dutch (NL)     | Netherlands (NL)\*        | `nl-nl`          |
| German (DE)    | Germany (DE)\*            | `de-de`          |
| Norwegian (NO) | Norway (NO)\*             | `no-no`          |
| Spanish (ES)   | Spain (ES)\*              | `es-es`          |
| French (FR)    | France (FR)\*             | `fr-fr`          |

\**Our widget currently uses the rules from Denmark (DK) for this jurisdiction, with specific support for local rules planned for a future version.*

Additional jurisdictions and languages will be added over time.

{% hint style="info" %}
If you do not specify a language, or if the language you set is not supported by us **in the visitor's jurisdiction**, English will be used. The table above lists the supported combinations.
{% endhint %}

To set the display language, initialise your widget with the `locale` option set to the value for the language you desire. For example, to use Danish when the jurisdiction is Denmark, your widget's initialisation would look similar to this:

```javascript
legal.widget({
    type: "cookie",
    widgetPublicKey: "...",
    locale: "da-dk",
});
```

## Widget button colours

Most of the European data protection agencies, including the Danish and French, have issued cookie guidelines in which they mention that the “accept” vs “reject” buttons (*also referred to as "accept all" vs "accept necessary" or "yes" vs "no"*) should have the same colour.&#x20;

We therefore recommend that you take a look at your cookie pop-up and make sure that your cookie pop-up’s buttons have the same colours.<br>

If you are using Openli’s cookie solution, it's easy to change your buttons’ colour by following these steps:<br>

1. Log in to your [Openli Account](https://app.openli.com)
2. Go to “Widgets” (left side menu)
3. Click the “Customise your cookie widget” button for your cookie widget
4. In the design view, change the colours of the buttons so that they are the same, as shown here:<br>

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FoLP5F1RYcYyAG020tMGO%2FScreenshot%202021-11-22%20at%2010.18.01.png?alt=media\&token=70f4c780-2af2-429c-8c83-6fe768a4f6b7)

If you choose to have different button colours, please note that this may be non-compliant and you should therefore consider this very carefully.

The default button colour setting in Openli is that the buttons have the same colour. If your cookie pop-up buttons have different colours, it's at your own risk and responsibility. &#x20;


# How to get color codes

For customising the widget, you'll need to get the color codes for the colours you want to use. This simply guide will show you where and how you can pick your colors.

## Hex colors

Designers use HEX colors in web design. A HEX color is a six-digit combination of numbers and letters defined by its mix of red, green and blue. You might have seen them if you use CSS to style your website.&#x20;

### Use a color picker to get HEX code

If you do not know the code of your selected color, we recommend [htmlcolorcodes.com](https://htmlcolorcodes.com/) to find the color:

![On htmlcolorcodes.com you can use their color picker to find the HEX code for your selected color. ](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MOVaAp-vxY_iiUg4ZuZ%2F-MOVbuzaKfBM22UQ8jKF%2Fimage.png?alt=media\&token=84b04f59-46df-478a-9191-5b5f13568ede)

Once you have found your desired color, simply copy the code next to the **#**-sign:

![We copy the color green with HEX code #56B682](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MOVaAp-vxY_iiUg4ZuZ%2F-MOVdEkDeh5EccAocil8%2Fimage.png?alt=media\&token=1aff3186-74b7-47ed-80da-7019bccb0c9e)

Now all you need to do is to paste it in the Openli Widget builder!

### Paste the color in the Widget builder

To use this code, paste in the appropriate field in the widget builder:&#x20;

![We now changed the border color to HEX](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MOVaAp-vxY_iiUg4ZuZ%2F-MOVeHuVIFqJRssJU6b6%2Fimage.png?alt=media\&token=a7092098-1729-4f2d-ae53-73405d4b0001)

## Done!

That's it! Congratulations with your awesome-looking widget! Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Set the widget language

Openli supports different languages, and this guide shows you how to change your cookie widget's language.

## Supported languages

The cookie widget currently supports these languages, in the given jurisdictions:

| Language              | Supported in jurisdiction | Option value     |
| --------------------- | ------------------------- | ---------------- |
| English (EN)          | All jurisdictions         | None, or `en-us` |
| Danish (DA)           | Denmark (DK)              | `da-dk`          |
| Dutch (NL)            | Netherlands (NL)\*        | `nl-nl`          |
| German (DE)           | Germany (DE)\*            | `de-de`          |
| Norwegian (NO)        | Norway (NO)\*             | `no-no`          |
| Norwegian Bokmål (NB) | Norway (NO)\*             | `nb-no`          |
| Swedish (SV)          | Sweden (SE)\*             | `sv-se`          |
| Spanish (ES)          | Spain (ES)\*              | `es-es`          |
| French (FR)           | France (FR)\*             | `fr-fr`          |
| Finnish (FI)          | Finland (FI)\*            | `fi-fi`          |
| Lithuanian (LT)       | Lithuania (LT)\*          | `lt-lt`          |
| Polish (PL)           | Poland (PL)\*             | `pl-pl`          |

\**Our widget currently uses the rules from Denmark (DK) for this jurisdiction, with specific support for local rules planned for a future version.*

Additional jurisdictions and languages will be added over time.

{% hint style="info" %}
If you do not specify a language, or if the language you set is not supported by us **in the visitor's jurisdiction**, English will be used. The table above lists the supported combinations.
{% endhint %}

## Setting the display language

To set the display language, initialize your widget with the `locale` option set to the value for the language you desire. For example, to use Danish when the jurisdiction is Denmark, your widget's initialization would look similar to this:

```javascript
legal.widget({
    type: "cookie",
    widgetPublicKey: "...",
    locale: "da-dk",
});
```

## Handling multiple languages:

If you need to handle multiple languages, please visit this guide in our documentation:

{% content-ref url="/pages/sZAcdaJFZVaVKYMY5tWa" %}
[Using projects to handle multiple languages](https://docs.openli.com/docs/general-openli-guides/using-projects-to-handle-multiple-languages)
{% endcontent-ref %}


# Use custom link/button instead of Cookie Shield

If you find that our shield blocks important elements of your website, you can use a custom link/button instead of the Cookie Shield to enable access to the cookie settings.

{% hint style="info" %}
This feature is only available for customers on Cookie Business.&#x20;
{% endhint %}

## Step 1: Choose "using a custom link/button"

In the Widget Builder, select the "using a custom link/button" option, as shown:&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MYiHKZorIJ8e_vEv2SD%2F-MYiHdxcYSlqtCkpgsiv%2FSk%C3%A6rmbillede%202021-04-20%20kl.%2009.58.45.png?alt=media\&token=44c35fa4-0dad-4962-8aca-a3f8d102f275)

Press save and exit.

## Step 2: Create a custom link/button on your webpage

To enable the custom link/button, you must add the  `data-openli="show-cookie-settings"` attribute to your chosen HTML element. For example, to use a `button` element, you would add the following:&#x20;

```markup
<button data-legalmonster="show-cookie-settings">Access your cookie settings</button>
```

When the user clicks or taps an element with that attribute, the cookie widget will show the settings page.

{% hint style="info" %}
If the `data-legalmonster="show-cookie-settings"` attribute is not present on at least one element on the page, the cookie widget will revert to showing the shield, and log a warning in the browser console.
{% endhint %}

## Example

Below is an example of how you could use this functionality on your page:&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FB6XKFQ6LjYcWqNoFiqsn%2FScreenshot%202021-11-22%20at%2010.25.02.png?alt=media\&token=8ab9fe7b-f790-490e-827f-b35ac6b778e3)

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FONJ8EzBoo85MDc8XWRue%2FScreenshot%202021-11-22%20at%2010.25.18.png?alt=media\&token=f788eb63-ad8a-40c4-aac4-3b305c083a78)

The updated link would look something like this:

```markup
<a data-legalmonster="show-cookie-settings">Access your cookie settings</a>
```


# Add company name to cookie pop-up

How to incorporate your company name in your cookie pop-up.

{% embed url="<https://www.loom.com/share/4cd10f6cc69f43a1b8b1da7e9fdeaaab>" %}

Here is the step by step guide to incorporating your company name into your Openli cookie pop-up&#x20;

**Step 1:** Sign in to your [Openli account](htps://app.openli.com)

**Step 2:** In your dashboard choose the menu called "widgets".

**Step 3:** Choose the cookie  widget and click on "Customise your widget.

**Step 4:** At the left top corner of the next page, you have the ability to incorporate your company name into your cookie pop-up. We recommend that you write your full company name as this is a legal requirement in different European countries.

S**tep 5:** Then press "Save and close" and now your cookie pop-up will be updated and include your company name.


# Categorise your cookies

This video will show you how to categorise your cookies correctly

{% embed url="<https://www.loom.com/share/b7154dbca71549afa591b7bebf5deaaa>" %}

Openli automatically scans your website for new cookies on a regular basis.&#x20;

We may recognise some of the found cookies and in these cases the system will categorize them in the category most often used. However, it might not fit your purpose and in some cases we don’t know the cookies. So it is very important that you check if your cookies are categorized correctly. It’s also very important that you categorize the uncategorised cookies. &#x20;

Here is how you can categorize the cookies:&#x20;

* Go to Cookies in the navigation menu.&#x20;

You can here see if you have uncategorised cookies and you can also see the categorized ones.&#x20;

For the uncategorised cookies you will have the option to add a cookie to an existing provider, by clicking the provider in the Select provider dropdown, or to add a new provider if needed.&#x20;

When adding a new provider, you need to provide the provider's full name, address, the description (what you do with the provider), the provider's privacy-policy URL and more (see the article: “How to add information to your vendors”# .&#x20;

After a provider is added, it can be selected in the list as described above, allowing for quicker categorisation of more cookies.

For the already categorized cookies, you can move them to another category by clicking on the vendor’s name and then select another category at the top of the page.&#x20;


# Adding information to cookies

{% hint style="info" %}
To be GDPR compliant, it is important that your cookie widget and policy must also contain information about what personal data you collect from each cookie, what you use it for, how long data is retained etc. Here is how you can add this information.
{% endhint %}

### Why is this necessary?

It is necessary because the GDPR requires you to make information available to your user about:&#x20;

* data collected
* purpose of the processing&#x20;
* legal basis&#x20;
* data retention&#x20;
* legal basis&#x20;
* duration of the cookie
* type: e.g. cookie / local storage / session storage
* information about the cookie provider, link to the privacy policy and contact details (add it to your provider’s information)
* location of processing (add it to your provider’s information)
* transfer to third countries (add it to your provider’s information)

You should provide clear information about all cookies including those that are strictly necessary, and, if personal data is involved, then you will be required to specify the legal basis for using those cookies.

IMPORTANT: The information must be in the same language as your website, i.e if your website is in Danish, the information should be in Danish.

### How to add information to cookies

Adding any additional information to a cookie is easy to do in Openli.

To begin, log in to your Openli account on [openli.com](https://app.openli.com/employees/sign_in)

Next click the *Cookies* in the side menu on the left to go to the cookie management:

<div align="left"><figure><img src="https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FmB4K3A2ciEWdWNlNhnYZ%2FScreenshot%202023-05-02%20at%2015.05.43.png?alt=media&amp;token=c419e020-68c4-4846-8636-3cabed61eff7" alt="" width="287"><figcaption></figcaption></figure></div>

Then select the provider of the cookie you want to edit. In this example we have chosen Openli and inserted the necessary information:

<figure><img src="https://lh3.googleusercontent.com/_JsI4VQjN_08Aw6U3ARfxX7uSjQOqLr0A7eVIQIWkA-iAe0BFhMXBhgdBeMjYNfgXksYHIJf8ERM1PdJOfucpi-CNgEdnYuFlBmf_gsZW5o_Y5cLZGUCcm29TW83QFgNM_sMI8a7GEPGYOmzgkzgNMs" alt=""><figcaption></figcaption></figure>

You can choose the correct legal basis by using the dropdown menu.

We have made the default settings (i.e. legitimate interest for necessary cookies and consent for marketing and analytical cookies) to guide and help you but please note it’s your responsibility to check and make sure that you have the correct legal basis.

It is very important that you **end by clicking "Save changes"** in the top right corner of the provider page to save any changes made to the cookie's information. Once this is done you'll have successfully updated your cookies information.

{% hint style="warning" %}
Important: We would love nothing more, than to be able to add the information for you automatically. Unfortunately, we can’t see what data you collect, what you use it for etc. So it’s your responsibility and you need to add it.
{% endhint %}


# Adding information to your cookie providers

To be GDPR compliant, it is important that your cookie widget and policy must also contain information about your cookie provider. Here is how you can add this information.

## Why is this necessary? <a href="#docs-internal-guid-3037aba5-7fff-07f3-beb3-3e2b8a66be4c" id="docs-internal-guid-3037aba5-7fff-07f3-beb3-3e2b8a66be4c"></a>

It is necessary because the GDPR requires you to make information available to your user about:

* Information about the provider, link to their privacy policy and contact details
* What the provider is used for and how they are processing data,&#x20;
* location of processing&#x20;
* transfer to third countries

You should provide clear information about all providers including cookie providers, local storage providers, session storage providers etc.&#x20;

IMPORTANT: The information must be in the same language as your website, i.e if your website is in Danish, the information should be in Danish.

## How to add information to your cookie providers

Adding any additional information to a cookie provider is easy to do in Openli.

To begin, log in to your Openli account on[ openli.com](https://app.openli.com/employees/sign_in)​

Next click "Cookies" in the side menu on the left to go to the cookie management:

<div align="left"><figure><img src="https://lh5.googleusercontent.com/IckRbXpKLwgMe20TcR74MJrFG1bLmAnQTbQv4gJt2NBJxVx66B1BiXVRYPTdz5kzCDVAFxuALibX_hs8rnV7irBGwOoozGRtcY84P73M7wTQGcKhw-cYGDAQgJ_pS8yMWccRsobG-OFxREMbWEjfnXc" alt="" width="188"><figcaption></figcaption></figure></div>

Then select the provider of the cookie you want to edit. In this example we have chosen Openli. Now you can add the information:

<figure><img src="https://lh4.googleusercontent.com/2KKeBNrtUqN7wxrnrMdDzwireeleRqRNZPihv8kg_TyKLB1s9NW4Np1v6TskPQTMYSylEPHBo6J4bD4ArzC0iIB_c9HVRH1S8aWnQcGdyPpO4wkFXnQpOhqXM35MhI5nsJK8sqQ12ruRZIE15D3cnlY" alt=""><figcaption></figcaption></figure>

It is very important that you **end by clicking "Save changes"** in the top right corner of the provider page to save any changes made to the cookie's information. Once this is done you'll have successfully updated your provider’s information.


# Blocking Cookies with Openli

It is very important to block cookies so they are only set if consent is given. If you do not block non-necessary cookies, your website is not compliant. Here you can find guides on how to do it.

There are two ways to block cookies with Openli: Manually and with Google Tag Manager.\
\
If your scripts are set using Google tag Manager, you need to follow this guide:

{% content-ref url="/pages/-MT\_3fy3FYHASMN-w\_qr" %}
[Block cookies with GTM](https://docs.openli.com/docs/legacy-integrations/how-to-use-google-tag-manager-with-legal-monster/block-cookies-with-gtm)
{% endcontent-ref %}

If not, you need to block them manually following this guide:

{% content-ref url="/pages/-MG3l3FsNnDUXmu\_I24e" %}
[Blocking cookies](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies)
{% endcontent-ref %}


# Cookie expiration dates and lifespan

Did you know that cookies have a lifespan, and that there are laws determining how long a cookie's life span is allowed to be?

Well, in that case here is a short rundown of the wheres and whats of cookie lifespans.

Cookies are, as you might know, small files stored on your computer when browsing the internet, designed to track your behaviour, choices, system info etc.

They do so for a predefined amount of time, before they expire. meaning that they stop tracking you. Many are simple session cookies that expire when the browsing session ends, but some can have lifespans that are much longer, which can mean, that the use of the cookie on your website could be non compliant.

### Why is it important to keep track of my cookies' expiration dates?

The short answer is, that to be compliant requires cookies to be active for a maximum of 365 days. Then you would need to collect new consent to make sure you are still allowed to collect the data.\
\
The big challenge with cookie lifespan is that many common cookie providers ignore this and in some cases we find cookies set to a life span of two, five or in some cases even ten years (effectively setting them "forever" as most users will change most of their devices at least once every decade).\
\
Unfortunately, as a website owner, it is your responsibility that you do not have any cookies with lifespans exceeding one year.

### So how do I change the lifespan of a cookie?

This depends on the cookie and the script that sets the cookie. \
&#x20;\
Unfortunately this varies immensely from cookie to cookie so we can't tell you how to do it on all cookies. \
\
We can however help you our with one of the most common ones. \
\
We currently have a guide for :\
[Google Analytics](https://docs.legalmonster.com/guides/cookie-expiration-dates-and-lifespan/changing-expiration-on-google-analytics-cookies)


# Changing expiration on Google Analytics cookies

There are several ways to change the cookie lifespan on a cookie for Google analytics cookie. The default lifespan for the Google Analytics cookie is currently two years.\
\
The method you need depends on how your Google analytics is set up.

### If you use the old google analytics script:

If you have an old Google Analytics script on your website, you can specify the expiration date directly in the script and overwrite of the default value of two years. The value sets the cookie expiration, in seconds. \
\
All you need to do is add the *cookieExpires* parameter to the line in the script that creates the cookie by adding *{'cookieExpires': 31536000}*, like this:

```
ga('create', 'UA-XXXX-Y', {'cookieExpires': 31536000});
```

Making the script look something like this:

```
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXX-Y', {'cookieExpires': 31536000,'cookieUpdate': 'false'}); ga('send', 'pageview');</script>
```

In some cases you might need to make sure cookie updates are turned off by setting the parameter *cookieUpdate* to *false*. This can be done by adding *'cookieUpdate': 'false'* to the parameter setting so it looks like this:

```
ga('create', 'UA-XXXX-Y', {'cookieExpires': 31536000,'cookieUpdate': 'false'});
```

You can read more about modifying your analytics script in googles documentation here:\
<https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference>

### If you are using Google Tag Manager (GTM)

In this case you can simply set the lifespan in the tag settings for your google analytics tag.

* Go to the global Google Analytics Page View Tag.
* Check the box: Enable overriding settings in this tag
* open *more settings*
* Open *Fields to Set*
* Press: *Add Field* and fill out the two fields as shown below.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-Mgdg-MmdQqNsdIPibSi%2F-Mgdot4ZpWEPEmkgpeSR%2FScreenshot%202021-08-09%20at%2009.29.30.png?alt=media\&token=b17c4b9f-09a7-4eb8-87de-c53db990e845)

Don't forget to save the settings and you're good to go.

### If you are using the new gtag js

You can configure the gtag to set the cookie expiration like this:

```
gtag('config', 'GA_MEASUREMENT_ID', { 'cookie_expires': 31536000});
```

Check the  documentation for gtag here:\
[https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id<br>](<https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id&#xA;&#xA;>)


# Checklist: Website Compliance

Use this checklist to ensure a smooth transition when taking your integration live.

{% hint style="info" %}
When setting up Website Compliance, please make sure you have had a talk with our Customer Success Team to make sure you get the easiest setup process possible. The setup requires some basic knowledge of at least HTML, CSS, APIs and webhooks.
{% endhint %}

This checklist provides you with an overview of which steps must be complete for you to go live.

### :white\_check\_mark: Agreements created and published

Most importantly, your agreements must be complete and published. For example, users need to be able to read both your Terms of Service and your Privacy Policy, when they consent to terms.

**Make sure you have:**

* [ ] A Privacy Policy
* [ ] A Terms of Service Policy, *if you use our widgets for consent and signup*

### :white\_check\_mark: Correctly configure your widgets&#x20;

Each widget must be correctly configured to be legally compliant. Make sure that your widgets are configured as intended:

* [ ] Make sure that your audience is correctly set - business or consumer.
* [ ] Make sure that your consent widget is connected to the correct agreements.&#x20;

These are legally binding, so make sure that your agreements are paired correctly with your widgets for signup, marketing, etc. For instance, if you have a "*Signup for a service*"-widget, you'll need to include both a privacy policy and your terms of service.&#x20;

{% hint style="info" %}
If you do not specify a language, or if the language you set is not supported by us **in the visitor's jurisdiction**, English will be used.
{% endhint %}

### &#x20;:white\_check\_mark: Installed widgets on your website

The widgets need to be installed correctly. We highly recommend adding some UI test to your test suite to make sure, that the widgets are shown and working.&#x20;

Follow our technical documentation to [install the widgets properly](https://docs.openli.com/docs/documentation/legaljs-widget#setup).&#x20;

* [ ] A signup-consent widget is used when users sign up, and can include a request for email-marketing consent.
* [ ] A separate email-marketing consent widget is used when users sign up for your newsletter, or another email marketing form that&#x20;

## :tada: Go live!

Ready, set, go! You're now ready to become a platinum data citizen. Forgot worrying about legal compliance, and know that our privacy mascot, Li, is taking care of things for you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FZjwdCELvoX5qm4reRBLV%2Fconnect-openli.png?alt=media\&token=1d0809ba-fae0-47b0-b865-9cb22528dc75)


# Website Compliance

This guide will show you how to get started with your website compliance.

{% embed url="<https://www.loom.com/share/495f8143a02743a784a73084c553bc52>" %}

## Step 1: Generate your privacy policy

Website compliance journey starts with generating your privacy policy and embedding it on your website.&#x20;

Once that is done, you will get "unlock" your privacy badge.&#x20;

## Step 2: Embed your privacy badge

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F1OcBzHpBx18kbFv9VEub%2FScreenshot%202021-11-22%20at%2010.30.57.png?alt=media\&token=5c273dde-2141-4726-b634-8be301bcca2b)

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FPbGYyUerplhWPMqv28Rz%2FScreenshot%202021-11-22%20at%2010.30.37.png?alt=media\&token=b7eda871-2174-4f0c-ba39-ca136ec39626)

The privacy badge tells your customers and users about how you are processing their data and caring about privacy. They can easily access your privacy policy and read more about your handling of their personal data.&#x20;

## Step 3: Upload other legal agreements

Its also possible to upload your Terms of Service, Terms and Conditions, Data Processing Agreement and other legal documents you have on your website. \
\
Once uploaded, you can embed them on your website by following the guide "[Embed your cookie policy and other legal documents](https://docs.openli.com/docs/policy-and-agreement-management/embed-your-policies-and-legal-agreements)".

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fu0cQo7hftOVE3gYr4jxo%2FScreenshot%202021-11-22%20at%2010.56.44.png?alt=media\&token=89b93f8a-3324-443a-a235-368603c53f43)

The advantage about uploading your documents is that you only need to update your agreements and policies in your Openli account. When you have updated them in your account, they will automatically be updated on your website

## Step 4: Collect the right consents

You can also make sure that you capture the right consents for these documents by creating consent widgets:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FXUR6Yq10Ucm938iVlMkD%2FScreenshot%202021-11-22%20at%2010.57.42.png?alt=media\&token=c651379c-aa3a-4dec-b4e3-7858ca785307)

We offer different widget, and you can customise them just for your need. This will make it possible to get the right consent for the right documents in the right places. More importantly, also prove that you got the consents via the audit trail!&#x20;


# Universal Consent Management

How to use our Universal Consent Management widget and use webhooks and Zapier to notify other systems of consent.

{% hint style="warning" %}
This functionality requires an Openli Website Compliance subscription. \
\
It may also require subscriptions for third-party services such as Zapier, Mailchimp, etc.
{% endhint %}

Our Universal Consent widgets allow you to collect consent for many purposes, including email marketing, newsletters, and terms and conditions.\
\
It works by attaching to an existing form, and inserts a vetted consent text, and registers the consent when the form is submitted.\
\
In this guide we will set up email marketing consent collection, linking it to Mailchimp using a webhook to set a tag identifying users that have consented to email marketing. \
\
**The concept should work on any system that can connect with Zapier, not just Mailchimp.**

### What do I need before I start?

For this guide you need the following:

1. An Openli account running a *Website Compliance-*&#x6C;evel subscription.
2. A Mailchimp account with a tag named *Consented* (or something similar).
3. A Zapier premium account to catch the webhook.
4. A website with a form to collect emails for marketing - in this guide we will use a Shopify site.

### Set up the widget

First you need to set up a widget.\
\
Go to *Widgets* in [your Openli dashboard](https://app.openli.com/) and click *New widget*:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F5wf5uARQZHBqlUwxFbBs%2FScreenshot%202021-12-09%20at%2013.29.32.png?alt=media\&token=02a5c65e-b50a-4d94-929f-f10b31626db3)

Then select the relevant widget type for your purpose and context. In this example we will use the *Sign up for a newsletter* option.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FdySkeyLFmZl6G3LJVdF6%2FScreenshot%202021-12-09%20at%2013.29.41.png?alt=media\&token=c1f4a07b-f47b-4ec9-8722-4c47856d5f5c)

Next we select the kind of users your form is for, either *Business users* or *Consumers.*

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FlRCrJKNeHdJRyBhRP95V%2FScreenshot%202021-12-09%20at%2013.29.49.png?alt=media\&token=e6554ddf-92a1-4659-8289-c21b4ffe009e)

Then we select which privacy policy to link to this widget. If you do not have one already, you will be prompted to do so.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FMFm2S2iWg0DyWb1rED9o%2FScreenshot%202021-12-09%20at%2013.30.00.png?alt=media\&token=7e564e2d-a000-4a7c-862c-e6d8da839324)

Next we need to select the types of emails we will be sending out.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FR5SRkM8YNGCZdRBtljaK%2FScreenshot%202021-12-09%20at%2013.30.13.png?alt=media\&token=4e00352b-ff2b-4683-a4dd-0ade219c9dc6)

And finally you get the code needed to use the widget:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Ft0pKgromNBe0pXhuNcdg%2FScreenshot%202021-12-09%20at%2013.30.35.png?alt=media\&token=566f739e-c830-4433-8123-9a3571a62900)

This can always be found in the *Widgets* section. Simply click the widget name to get the code.

### Install the widget in the form on the website

The code you'll get for the widget will look something like this:

```html
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.openli.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "newsletter",
        widgetPublicKey: "YOUR_WIDGET_PUBLIC_KEY_HERE",
        targetElementSelector: "#legalmonster-newsletter-YOUR_WIDGET_PUBLIC_KEY_HERE",
    });
</script>

<div id="legalmonster-newsletter-YOUR_WIDGET_PUBLIC_KEY_HERE"></div>
```

Note two things:

1. The `widgetPublicKey` will differ from our example.
2. So will the `targetElementSelector`, as it is linked to the key.

You will need to insert the script part of the code just below your form and add input selectors for name and email like in my example below on lines 8 and 9:

```html
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.openli.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "newsletter",
        widgetPublicKey: "YOUR_WIDGET_PUBLIC_KEY_HERE",
        targetElementSelector: "#legalmonster-newsletter-YOUR_WIDGET_PUBLIC_KEY_HERE",
        nameInputSelector: "#YOUR_NAME_INPUT_SELECTOR_ID",
        emailInputSelector: "#YOUR_EMAIL_INPUT_SELECTOR_ID",
    });
</script>
```

The `div` section of the generated code **must be placed inside your form** to allow our script to latch on to the form and place the necessary legal text as well as collect the consent when the form is submitted. The consent text will be placed in the same position as where you include the `div` in your form.\
\
I have made an example of the finished setup, based on a simple email form in a Shopify site:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FPV6yCCp4crJqDaHublO4%2FScreenshot%202021-12-09%20at%2014.32.29.png?alt=media\&token=853c2036-f9f3-471f-b1f4-7a8676c62245)

Notice how the `div` section is placed inside the form. Be aware that you may need to place it slightly differently in your specific form, depending on where the legal text is placed when loading, and the styling applied by your page's theme.

### Linking Openli and Mailchimp via Zapier using webhooks

Now that the widget is up and running we need to link the consents it collects to our Mailchimp account. **Before you get started on this part, make sure that you have created a tag called e.g.&#x20;*****Consented*****&#x20;in Mailchimp**, as we will be using this to mark any users that have given consent to email marketing.

Go to your Zapier account and create a new Zap. We suggest you use the app *Webhooks by Zapier.*

Set the *Trigger Event* to be *Catch Hook:*

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FPYFQojK0jgYq5WhDcsg7%2FScreenshot%202021-12-09%20at%2014.50.35.png?alt=media\&token=e50f5798-344f-435f-b452-8dc409f7a29a)

Next you need to set up the trigger. For that we need to copy the custom webhook URL from Zapier (see screenshot below) to your Openli project's settings, so Openli can trigger your Zapier zap when an email marketing consent is received.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FZUueI0c1pbCMmtMkDy9B%2FScreenshot%202021-12-09%20at%2014.53.34.png?alt=media\&token=b1db7a31-bb1b-4f58-8f2c-d7d1452da2cc)

Once copied, go to your Openli dashboard's *Settings* page. There you will find the webhooks section. Click *Add webhook*.

{% hint style="warning" %}
**IMPORTANT:** Make sure you are working on the correct project! If you have created multiple projects, you can see the active project and change to another project in the bottom left corner of the Openli app.
{% endhint %}

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FwfFThOqOmU7HuXImfuPN%2FScreenshot%202021-12-09%20at%2014.55.34.png?alt=media\&token=6d701a6c-bcc6-4c5b-be4c-f16e73229ff4)

In the webhook setup page, make sure you select the correct project, and then add the custom webhook URL you copied from Zapier. Make sure you select the correct consent event, in our example this is *email\_marketing\_consent\_created*, and click *Create webhook endpoint.*

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FpuiBNX8VuSjYtJqTZ7nf%2FScreenshot%202021-12-09%20at%2015.00.09.png?alt=media\&token=d435488d-e4ba-474d-accc-744d774a31bb)

At this point Zapier gives you the option to test the trigger. This is a good idea to do.

Go to your website, and fill in the form and submit the name and email. Then go to your zap setup and test the trigger. You should receive data containing information on the submission.

{% hint style="info" %}
For extra safety, you could insert a filter in the zap that ensures that it only continues if the event name exactly matches *email\_marketing\_consent\_created.*
{% endhint %}

### Linking the zap to Mailchimp to activate your *Consented* tag

Next, we will link the zap to Mailchimp to make it add a tag to the subscriber.\
\
For the next step in your zap, choose the *Mailchimp* app and select event *Add* S*ubscriber to Tag.*

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FlgolwXBWjCU1MhvxbzEN%2FScreenshot%202021-12-09%20at%2015.24.18.png?alt=media\&token=e01d92d4-0392-49e4-b8a1-6407460de07b)

Then you choose your Mailchimp account, which you will need to log in to as part of this process.\
\
Once the account is chosen, you set up the action by selecting the audience you want to affect, the tag you want to add to users (in this case the *Consented* tag that you have made in your Mailchimp account before starting this guide), and the email address.

You should select the *Consent User Email* field as the value for the *Email Address* option.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FQ7b5xQ1zXFBdHsWVd3cv%2FScreenshot%202021-12-09%20at%2015.31.20.png?alt=media\&token=cb143a5b-2d71-4586-a1b9-256e80a4fa4d)

Then all you need to do is turn on the zap and you should be good to go.\
\
We suggest that you test the action by filling in your form and submitting it, and then going back to your zap setup and running the test action. You can also go to your Mailchimp account and check that the newly submitted test has the *Consented* tag. \
\
You can now use the *Consented* tag in Mailchimp to filter your subscribers and send (or not!) the appropriate emails.\
\
The general principles of this guide will work on any system that integrates with Zapier, and even any system that supports receiving webhooks directly, without needing to use Zapier.


# Generate your privacy policy

With Openli its easy to generate a privacy policy that fits your business and the way you are using data. See this video for information about how to get started generating your privacy policy

{% embed url="<https://www.loom.com/share/a3366d0d05fa4915a80f8e4385247d6c>" %}

Here are a step by step guide on how to get started:

1. Log into your Openli account
2. Look for the section "Website compliance", more specifically "Generate your privacy policy" which is on the front page of your Openli dashboard.
3. Click "Generate" and you'll then be taken to a page where you will start to generate your privacy policy

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MVu8aSWku37EU6Pqeqm%2F-MVu8mxIViQVWkq1m5UW%2Fimage.png?alt=media\&token=568ff069-774f-4db8-a661-6483ad04469d)

1. The first questions you'll be asked to fill out is your company details and contact details
2. After that you'll be asked questions about the purposes you are collecting data for and what type of data you are collecting
3. There will also be some questions about your security, if you are transferring data outside the EU etc.
4. Once you have answered the questions, your privacy policy will be generated and be sent to your inbox

We recommend that you upload your newly generated privacy policy into your Openli dashboard and also embed it on your website. See the guide on [how to embed your policies](https://docs.openli.com/docs/policy-and-agreement-management/embed-your-policies-and-legal-agreements).


# Changing an old cookie policy to a new on autopilot

Here is a short video guide

{% embed url="<https://www.loom.com/share/3624f6c797494964b6f0db83585c2cd1>" %}

Below you'll find step by step instructions in text if you prefer to read them in stead :)

### Making a new policy on autopilot

Making a new policy on autopilot is easy. \
\
it takes only a few simple steps:

1. Go to app.openli.com and log in
2. Go to agreements in the side menu
3. Click create new policy in the top right corner and select "Cookie policy on autopilot" from the dropdown
4. Fill out the form. Don't forget to add if you are using pixels, as they need an added section in the policy (added automatically when you select it)
5. click create policy and approve it

Once that is done you have your policy ready

### Updating it in your widget

Now you need to update it in your widget.&#x20;

1. Go to widgets in the sidemenu
2. Click "Edit widget" for the appropriate widget in your list
3. Use the first drop down in the editor menu to select the new policy
4. Save the widget

PRESTO!!! You're done. \
\
The widget will now show the new policy which is of course automatically updated, because it is now on autopilot.\ <br>


# Embed your policies and legal agreements

Openli helps you to manage and update your cookie policy. This feature lets you embed your cookie policy on any page of your website.

{% embed url="<https://www.loom.com/share/410325c059894e8eba9060edc958cca0>" %}

## How to embed a cookie policy

### Find your cookie policy's public-key

In your [Openli dashboard](https://app.openli.com), click "Agreements", and copy the public-key of your cookie policy, as shown in the image below:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FBHXtTEwvMg7iFnOQJdsm%2FScreenshot%202021-11-22%20at%2010.28.05.png?alt=media\&token=0226ea70-a2cc-479d-8766-76c0e5a8e864)

### Add the embed code to your website

The feature requires both a containing element and a JavaScript snippet to work. You can use an existing HTML element on your page as the container, or add a new one where you want to show the cookie policy on your page.

For example, if you add the following HTML to your page where you want the cookie policy to be shown:

```javascript
<div id="cookie-policy-container"></div>
```

...and add the following JavaScript, replacing `policy-public-key` with the public key of your own cookie policy:

```javascript
<script>
    // NOTE: This must be placed/run AFTER the code snippet for your cookie widget.
    legal.document("#cookie-policy-container", "policy-public-key");
</script>
```

...then the latest version of your cookie policy will be displayed inside the `<div>` element.

{% hint style="info" %}
If you want to show the cookie policy in an element that already exists on your page, you can use a standard CSS selector that matches it, instead of `#cookie-policy-container` in the example above.
{% endhint %}

## How to embed other legal agreements&#x20;

### Find your agreement's public key

In your [Openli dashboard](https://app.openli.com), click "Agreements", and copy the public-key of your agreement, as shown in the image below for the example of a cookie policy:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FBHXtTEwvMg7iFnOQJdsm%2FScreenshot%202021-11-22%20at%2010.28.05.png?alt=media\&token=0226ea70-a2cc-479d-8766-76c0e5a8e864)

### Add the embed code to your website

The feature requires both a containing element and a JavaScript snippet to work. You can use an existing HTML element on your page as the container, or add a new one where you want to show the policy on your page.

For example, if you add the following HTML to your page where you want the policy to be shown:

```javascript
<div id="policy-container"></div>
```

...and add the following JavaScript replacing `policy-public-key` with the public-key of your own policy:

```javascript
<script>
    // Replace policy-public-key with your policy's public key.
    legal.document("#policy-container", "policy-public-key");
</script>
```

...then the latest version of your policy will be displayed inside the `<div>` element.

{% hint style="info" %}
If you want to show the policy in an element that already exists on your page, you can use a standard CSS selector that matches it, instead of `#policy-container` in the example above.
{% endhint %}

## Advanced options

### Insertion mode

You can use the`insertMode` option to change how and where the agreement is placed in relation to the target element:&#x20;

```javascript
<script>
    legal.load("<<WIDGET PUBLIC KEY>>"); // Only needed when the page loads no other widget.

    legal.document("#agreement-target", "<<AGREEMENT PUBLIC KEY>>",  {
         insertMode: "after",
    });
</script>
```

You can change the insertion method to one of the following options:&#x20;

| Insertion mode      | Description                                              |
| ------------------- | -------------------------------------------------------- |
| `replace` (Default) | Replaces the specified target element with the widget    |
| `after`             | Inserts the widget *after* the specified target element  |
| `before`            | Inserts the widget *before* the specified target element |

### Link to a specific part of an agreement

You link to a specific part of an agreement using any [valid CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors), and legal.js will scroll it into view.

It is important that the CSS selector you use only return one element, so the widget can know which element to scroll into view.

Below we have provided an example of targeting a `section` element in an agreement, using an ID selector to find it.

#### Scrolling part of an agreement into view using an `id` attribute&#x20;

To target part of an agreement using the `id` of an element, you can pass the `id` as the value of the `elementIdToFocus` option. For example, if your agreement contains a section like this:

```markup
<section id="refund-policy">
    <heading>Our refund policy</heading>
    <p>...policy details...</p>
</section>
```

...then you can make `legal.document()` ask the browser to scroll that part into view once the agreement has loaded, using this JavaScript:

```javascript
<script>
    legal.load("<<WIDGET PUBLIC KEY>>");

    legal.document("#agreement-target", "<<AGREEMENT PUBLIC KEY>>",  {
         insertMode: "append",
         elementIdToFocus: "refund-policy",
    });
</script>
```

A simple way to allow *dynamic* direct linking from other locations is to use the browser's built-in support for [fragment identifiers](https://en.wikipedia.org/wiki/Fragment_identifier) (everything after the `#` in the URL), and pass that to `legal.document()`.

If you have a page at `https://mysite.example/terms` that uses `legal.document()`, and the agreement you display there has a section with an `id` of `refund-policy` like in the example above, you can link to that page, and that *section*, from anywhere by using a link like this:

<https://mysite.example/terms#refund-policy> (note the `#refund-policy` part)

and code similar to this:

```javascript
<script>
    legal.load("<<WIDGET PUBLIC KEY>>");

    // Remove the leading "#" from the returned value, to get only the ID.
    var targetId = window.location.hash.replace(/#/, "")

    legal.document("#agreement-target", "<<AGREEMENT PUBLIC KEY>>",  {
         insertMode: "append",
         elementIdToFocus: targetId,
    });
</script>
```

This solution is generic, so you can also link to other sections in the same agreement, for example `https://mysite.example/terms#cancellation` if you have an element with an `id` of `cancellation`.

If your agreement does *not* have any elements with `id` attributes, you can also use the advanced HTML-editing mode in our WYSIWYG editor to add some. Look for this button in the editor toolbar to edit the HTML code directly:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-LsS64shSSYVb5eneExu%2F-LsSDYDFiWCZCpwIXi0L%2Ffroala-code-view-button.png?alt=media\&token=4d1774a1-2422-4404-bd55-1871f36f9053)


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

{% embed url="<https://www.loom.com/share/410325c059894e8eba9060edc958cca0>" %}

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.

### 1. Create a container element for the policy on your website

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.&#x20;

The container should be placed where you visually want to show the policy, as it will be loaded inside this container.

Here's how the container should look:

```
<div id="policy-container"></div>
```

{% hint style="info" %}
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"*
{% endhint %}

### 2. Create a dummy widget to load the policy

Secondly we need a dummy widget to load the policy.&#x20;

{% hint style="warning" %}
**If you do not have a subscription to our cookie-consent product,** please contact us for assistance with this step.
{% endhint %}

1. Go to app.openli.com and click widgets in the side menu.
2. In the top right corner click *"New widget"*
3. Select the cookie widget
4. click save and exit&#x20;

### 3. Setup the script that loads the policy

Finally you are ready to insert the script that loads the policy into the container.&#x20;

Make sure you have legal.js loading on the page:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.openli.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();
</script>
```

And below that insert this script:

```javascript
<script>
    legal.load("DUMMY-WIDGET-PUBLIC-KEY")
    legal.document("#policy-container", "POLICY-PUBLIC-KEY")
</script>
```

{% hint style="warning" %}
Note that it is important here that the CSS selector matches the unique ID you gave the policy container in the first step.
{% endhint %}

You will find the policy's public key in your Openli account under Agreements:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F3zltTW2qRPEGmNhBjhS9%2FScreenshot%202021-11-18%20at%2012.32.15.png?alt=media\&token=b76bcdc6-453e-4dd4-a906-3e5451b6727b)

And you'll find the dummy widget's public key under Widgets:

{% hint style="warning" %}
**If you do not have a subscription to our cookie-consent product,** please contact us for assistance with this step.
{% endhint %}

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FQ3DUsapodWxMtfWLqAAD%2FScreenshot%202021-11-18%20at%2012.32.01.png?alt=media\&token=df94e66e-8cbb-4357-8604-f68b16588ab8)

Once these two script are in, the page should load the policy automatically when opened and no widget is shown.


# Install the Privacy Badge

The privacy badge is a widget that gives you the ability to showcase your privacy policy in a different value while building trust with your users.

{% embed url="<https://www.loom.com/share/e88ad04851564e79b921be42c5eaf7d2>" %}

## Setup your privacy badge

1. log in to your Openli account
2. go to agreements and find the key for the agreement you want to link to the badge (Typically it would be your privacy policy).
3. If you don't have a agreement to choose from, follow the guide "Upload your terms". If you have already uploaded your privacy policy, you simply use the key for that agreement. Hold on to that key, We will need it in a moment.
4. Once you've selected an agreement, install this piece of code on your website just below your Openli cookie widget script:

```
<script>
  legal.widget({
    type: "privacy-badge-v1",
    agreementPublicKey: "YOUR_POLICY_KEY_HERE",
    targetElementSelector: "#privacy-badge",
  });
</script>
```

{% hint style="warning" %}
It is important it loads after the cookie widget script, as the script enables the badge functionality.
{% endhint %}

Make sure you replace the placeholder above with the public key of the policy you want to link to (the one we found earlier), from your Openli app.\
\
5\. Then place this div where you want the badge to show on your website. For example in the footer.

```
<div id="privacy-badge"></div>
```

Once this is done, the badge will show in the div when the page is loaded and you will be proudly displaying to the world that you care about your users privacy.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FPbGYyUerplhWPMqv28Rz%2FScreenshot%202021-11-22%20at%2010.30.37.png?alt=media\&token=b7eda871-2174-4f0c-ba39-ca136ec39626)


# Setting up SSO (Single Sign-On)

{% hint style="info" %}
This feature is available on our Privacy Hub Growth plan or higher. If you have any questions about your plan, please email <success@openli.com>.
{% endhint %}

### What is SSO?

Single sign-on allows you to use the same login credentials across multiple systems. To log in to one of those systems, such as Openli, you are redirected via a central identity provider (IdP), such as Google or Microsoft, who confirm your identity and return you to Openli.\
\
**Once SSO is set up on your Openli account, you must use SSO to log in.** Any existing username/password credentials will no longer work.

For a user to log in to your Openli account, they must have an email address in your SSO identity provider that **matches** their email address in Openli.

If a user does not yet exist in Openli, you must add them in the *Settings* section of your Openli account before they can log in.

{% hint style="info" %}
Users must be added to your Openli account to be able to log in with SSO.

Openli does not support automatic user provisioning.
{% endhint %}

### Get started with SSO&#x20;

To set up SSO on your account, please contact <success@openli.com> and tell us which domain you want to register as your SSO domain.


# SSO with Azure AD (Microsoft)

## General setup

No special setup is normally required for Azure AD.

Simply ensure that you have added users in your Openli account with email addresses that match their addresses in your Azure AD account, and confirm that we have enabled SSO for your domain.

## Troubleshooting

#### Users that exist in Azure AD and in Openli cannot log in

Your Azure AD settings might be too strict to work with Openli.

Openli is a verified publisher, which means that your Azure AD administrator should only need to ensure that the setting "***Allow user consent for apps from verified publishers***" is enabled, to allow users in your organisation with a corresponding user in Openli to log in.

[Please see this Microsoft guide for more information](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-user-consent?tabs=azure-portal).

Openli only requires these permissions to be granted by users:

* "*View users' basic profile*" (the `profile` permission)
* **"***Maintain access to data you have given it access to*" (the `offline_access` permission)


# SSO with Google

## General setup

No special setup is normally required for Google SSO.

Simply ensure that you have added users in your Openli account with email addresses that match their addresses in your Google account, and confirm that we have enabled SSO for your domain.


# SSO with Okta

How to set up single sign-on for Openli with Okta

## General information

Openli supports what Okta calls "Service Provider (SP)-Initiated Authentication (SSO) Flow". This means that **you must log in via** [**Openli's webapp**](https://app.openli.com/), *not* via the "Openli" app in your Okta account. If you try to log in via the "Openli" app in Okta, you will receive the following error:

```
403 User performed OIDC single sign-on to app - failure: missing_initiate_login_uri
```

**Management of users** on your Openli account **must be done from within your Openli account**. Openli does not support automatic user provisioning.

## Configuration steps

### In your Openli account, part 1

[In the Openli *Settings* page](https://app.openli.com/settings), navigate to the *Single Sign-on* section and enable the option "*Use Okta for single sign-on*":

<figure><img src="https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FEgKh5fl3Dj1pPd6MVL6u%2FScreenshot%202022-12-09%20at%2014.43.51.png?alt=media&amp;token=1024f2f8-da5c-4721-8ae8-e7304b0459d8" alt=""><figcaption><p>Okta single sign-on settings in Openli</p></figcaption></figure>

### In your Okta account, part 1

Install the Openli application in your Okta instance.

On the Okta admin page, click on the Openli application and then navigate to the *Sign On* tab. Next, you will need to copy the values you see here for *Client ID* and *Client secret* to your Openli account.

### In your Openli account, part 2

Paste the values of *Client ID* and *Client secret* from your Okta account to the corresponding fields in your single sign-on settings in your Openli account.

### In your Okta account, part 2

On the Okta admin page, navigate to the link titled *OpenID Provider Metadata*. Click this link. In the JSON document shown, look for **a key titled `issuer`** and copy the URL-value (without quotes) to the *Okta client issuer* field in your Openli Single sign-on settings.

### Final steps

Contact <success@openli.com> and tell us which domain you want to register as your SSO domain. When we have confirmed that this is set up, your SSO domain will show under *Single sign-on* in your Openli settings.

All general considerations from [Setting up SSO (Single Sign-On)](https://docs.openli.com/docs/general-openli-guides/setting-up-sso-single-sign-on)will now apply. Most importantly, make sure that the emails of employees/users you invite into your Openli account exactly match their Okta accounts. Your users can now sign in to their Openli accounts using Okta.

## Notes

To log in to the Openli platform using Okta, simply click the *Okta* button and authenticate with your Okta account:

<figure><img src="https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fy5ud1vlB6iV40CWHKu7B%2FOkta-login-circled.png?alt=media&amp;token=9df06108-1cc3-4856-9db5-31fd923174df" alt=""><figcaption><p>Log in with Okta using the "Okta" button instead of a username and password.</p></figcaption></figure>


# How to log in with SSO

Go to [app.openli.com](https://app.openli.com) to see the sign in page.\
\
Don't use the regular email and password fields to log in. If you do, you will be prompted to sign in using your SSO domain instead.\
\
Select the SSO option that matches your provider; in this example we are using Google:

<figure><img src="https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2Fy5ud1vlB6iV40CWHKu7B%2FOkta-login-circled.png?alt=media&amp;token=9df06108-1cc3-4856-9db5-31fd923174df" alt=""><figcaption></figcaption></figure>

​ Choose the SSO account matching your on your Openli account user:&#x20;

![Remember to choose the correct account if you are using multiple accounts on the same device.](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FN7yAMtMWULT2DWB8VdA7%2FScreenshot%202022-03-21%20at%2013.35.06.png?alt=media\&token=a940fe1f-69be-46e8-be48-064d7daa04cc)

​ Remember to choose the correct account if you are using multiple accounts on the same device.

And that's it. You are now signed in using your SSO account.


# Add a website to your Openli account

This video will show you how to add your website to Openli. Your website will be displayed in your policies.

{% embed url="<https://www.loom.com/share/e03fa99b8e914f3a8070f10a4cf73db1>" %}

Adding your website to your account (or any project in Openli, if you are running multiple projects) is important because it allows us to scan the website for cookies so you can get started setting up Openli. \
\
You can use the same method, if you at any point need to change the domain for the project as well.

{% hint style="warning" %}
If you have multiple projects, make sure the correct domain is selected in the bottom left corner before you make the change.
{% endhint %}

1\. Click *Cookies* in the side menu\
2\. Click the *Manage Domains* button in the top right corner\
3\. Type in the domain in the text box under *Manage domains*\
4\. Click the *add domain* button

That should do it. You domain is now added and will be scanned.


# Using projects to handle multiple languages

If you have a multi-language page, you should always present the cookie widget in the same language as your website.

{% hint style="info" %}
These features are only available for Cookie Business subscriptions.
{% endhint %}

## Setting up projects

{% hint style="warning" %}
Remember to always make sure you have selected the correct project in the bottom left corner whenever you work in the Openli app.
{% endhint %}

To properly handle consents from different languages, you need to have access to the projects feature. This feature is available in our Cookie Business subscriptions.

1. In your Openli dashboard, go to "Settings".
2. Click "Add project".
3. Name your project and save it. Use a name that makes it easily identifiable like "MYWEBSITE - EN" and "MYWEBSITE - DK".
4. Find your project in the settings page and click "edit"
5. Under "Manage cookie domains" add your website for the relevant language. For example: "<https://example.com/en/>" or "<https://da.example.com/>". It's important that you remember to include the language prefix or suffix, in case there are different cookies on each version of the website.
6. Now you should see your project in the bottom-left corner of the Openli app, in the expandable menu below the "Sign out" link.
7. Give each project a cookie policy in the appropriate language, and set up a cookie widget that uses it.
8. Embed the relevant widget for each language on your website, ensuring that you [set the correct *locale* so each widget displays in the desired language](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/setup-widget-language).

### Systems that do not support different JavaScript for each language version

Some systems doesn't allow you to change the scripts in the footer. This means that you can only insert one widget script, and you will need to customise it to your specific system's needs.

If you have difficulty with this and need advice, contact our customer success team at <success@openli.com> including as much detail as possible.


# Collect consents without storing IP addresses or user-agents

By default, Openli stores the IP address and browser user-agent with consents to aid provability. Openli lets you collect consent without storing these, which some jurisdictions might require.

### Exclude IP addresses and user-agents from the audit trail

Here's how to do it:

1. Log in to [your dashboard](https://app.openli.com/)
2. Click *Settings* in the left sidebar
3. In the Projects section, click *Edit* for the project you need to change
4. Tick the box just below the project name to *Exclude IP addresses and browser user-agent from audit trail* (see screenshot below)
5. Click *Save project*

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FqkjsqVcdcO1VeKJn7EyY%2Fimage.png?alt=media\&token=30205b2b-1d05-47ad-8e96-fec49e878088)

Once these simple steps are done, your audit trail will no longer collect IP addresses and browser user-agents in future consents for this project.


# Overview

On this page, you'll find an overview of the bits and pieces that constitutes Openlis technical suite.

## Legal JS

Legal JS is our Javascript-based framework that allows you to integrate all of our widgets on your site. Here you'll find guides to how you embed our widgets easily.&#x20;

{% content-ref url="/pages/-L\_r0gQWAMdBsTXJi1lz" %}
[Collect consent](https://docs.openli.com/docs/documentation/legaljs-widget/consent)
{% endcontent-ref %}

{% content-ref url="/pages/-M5MgHXYmb6Id9ZS5qLY" %}
[Collect cookie consent](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent)
{% endcontent-ref %}

## Openli API

Our API gives you the ability to integrate with Openli and automate your compliance. Use our API to auto-generate companies, consents or access documents.&#x20;

{% content-ref url="/pages/-LRMVo4XNoy2umrtwIYe" %}
[Consents](https://docs.openli.com/docs/documentation/legal-monster-api/consents)
{% endcontent-ref %}

{% content-ref url="/pages/-LRb8ljQlGrUp23dY5LN" %}
[Webhooks](https://docs.openli.com/docs/documentation/legal-monster-api/webhooks)
{% endcontent-ref %}


# Widget

Openli provides you with an easy and straightforward approach to collect and manage consent. We have a few widgets that do just that!

## Setup

The legal.js widget library requires a small snippet of JavaScript code to be included once in each page you use it on. This snippet is available in your account's **Widgets** section, and looks like this:

```markup
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();
</script>
```

Whenever possible, you should **include the snippet as the first script** in your page's `<head>` section:

```markup
<!doctype html>
<html>
    <head>
        ...
        <script>
            !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();
        </script>
        ...
    </head>
    <body>
        ...
    </body>
</html>
```

## What's next?

When you have legal.js loaded, you can begin to use its functionality to collect consents, show your legal agreements, and update user-data.

### General widget options

#### Identify a known user

Openli gives you the ability to identify your users more precisely using a unique value that your internal system already associates with them. Identifying a user this way allow us to be certain who the user is, and not to rely on cookies, which the user can change or delete.

To do this, You can provide the`legal.widget()` method with a value for the `identifier` option.

Here is an example of identifying your user when initializing a widget:

```javascript
legal.widget({
    type: "<<WIDGET TYPE>>",
    widgetPublicKey: "<<WIDGET PUBLIC KEY>>",
    identifier: "<<USER ID>>",
});
```

In the above example, `<<USER ID>>` is what you will substitute with your unique identifier for the user.

We recommend using database IDs because they tend to remain consistent over time. This helps to ensure that you can still recognize the same user in all of your analytics tools even though the user's other details might change.

#### Set the widget language

To set the display language, initialise your widget with the `locale` option set to the value for the language you desire. For example, to use Danish when the jurisdiction is Denmark, your widget's initialisation would look similar to this:

```javascript
legal.widget({
    type: "...",
    widgetPublicKey: "...",
    locale: "da-dk",
});
```

English is the default language, and supported languages are listed below.

{% hint style="info" %}
If you do not specify a language, or if the language you set is not supported by us **in the visitor's jurisdiction**, English will be used. The table below lists the supported combinations.
{% endhint %}

| Language       | Supported in jurisdiction | Option value     |
| -------------- | ------------------------- | ---------------- |
| English (EN)   | All jurisdictions         | None, or `en-us` |
| Danish (DA)    | Denmark (DK)              | `da-dk`          |
| Dutch (NL)     | Netherlands (NL)          | `nl-nl`          |
| English (EN)   | Great Britain (GB)        | `en-gb`          |
| English (EN)   | United States (US)        | `en-us`          |
| French (FR)    | France (FR)               | `fr-fr`          |
| German (DE)    | Austria (AT)              | `de-at`          |
| German (DE)    | Germany (DE)              | `de-de`          |
| Norwegian (NO) | Norway (NO)               | `no-no`          |
| Swedish (SV)   | Sweden (SE)               | `sv-se`          |


# Collect consent

Collect consent from your users integrated with all forms.

## Add consent collection to your form

Make sure that you have followed the setup instructions in the [Getting started](https://docs.openli.com/docs/documentation/legaljs-widget) section to include the legal.js library on the page with your form. Note that, if your form is in an `iframe`, then legal.js must be included *in the HTML of the `iframe`*, otherwise legal.js will not be available there.

To collect consent using legal.js, you must specify where you want to insert the widget. You can use an existing element as the target, or add a new one to serve as the target. The target element is specified by a CSS selector in the `targetElementSelector` option.

{% hint style="warning" %}
**Important note:** The target element **must be inside** the `<form>` element that requires consent. This is currently a technical requirement for legal.js to function, and an error like "*Unable to find signup form. Aborting setup.*" will be logged to the browser console if this is not the case.
{% endhint %}

You can use any [standard CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) to specify the target element. It is important that your selector matches exactly one element; if it does not, legal.js will not work, and will log an error to the browser console.

You can perform a simple test by using the [standard `Document.querySelector()` method](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector) in your browser console, passing it the same selector that you intend to pass to `targetElementSelector` and verifying that the matched element is the one you expect. Note that, if your form is in an `iframe`, you will need to run this test in the console of the `iframe`, not the console of the surrounding page.

### Example integration

If you have a form with a structure like this:

```javascript
<form>
    <label>Name:
        <input type="text" name="fullname" />
    </label>
    <label>Email:
        <input type="email" name="email" />
    </label>
    <div id="target-element-id"></div>
    <input type="submit" name="continue" value="Continue" />
</form>
```

...with an empty `<div>` as the target element, whose `id` attribute is set to `target-element-id`, then you can use a snippet of JavaScript like this to enable the widget:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
    });
</script>
```

The target element is replaced with our widget, so it is sufficient to use an empty `<div>` element as shown here.

### Advanced integration

If you cannot change the HTML of your page, you can still use our widget. See the section on [targeting an existing element](https://docs.openli.com/docs/documentation/legaljs-widget/consent#target-an-existing-element).

If you have several buttons with a submit action (such as updating a cart as well as checking out), see the section on [multiple submit buttons](https://docs.openli.com/docs/documentation/legaljs-widget/consent#multiple-submit-buttons).&#x20;

#### Target an existing element

If you cannot change the HTML of your page, `legal.widget()` offers an option to add the widget before or after an existing target element that you choose.

The following code searches for a target element with the ID `target-element-id` and **replaces** that element with the widget:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
    });
</script>
```

If you need to **preserve** the target element, you can use the`insertMode` option to change how and where the widget is placed in relation to the target element, like so:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        insertMode: "after",
    });
</script>
```

You can change the insertion method to one of the following options:&#x20;

| Insertion mode      | Description                                              |
| ------------------- | -------------------------------------------------------- |
| `replace` (Default) | Replaces the specified target element with the widget    |
| `after`             | Inserts the widget *after* the specified target element  |
| `before`            | Inserts the widget *before* the specified target element |

### Identifying the user

When your users interact with Openli, we assign a unique ID to them. This is imperfect, because it can vary under many circumstances, for example when they use another browser. To allow us to identify your users precisely, you can provide us with the same unique identifier that you use internally when identifying them. This will avoid the creation of multiple records in our audit trail for the same user.

To do this, simply pass the `identifier` option with your unique identifier as its value. Here is an example of identifying your user when calling `legal.widget()`:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        identifier: "Your unique user ID",
    });
</script>
```

We recommend using database IDs or similar unchanging unique keys for the `identifier`.

### Styling options for the widget

You can change the width of the outermost border, and the amount of outermost padding, by specifying the `outerBorderWidth` and `outerPaddingSize` options:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        outerBorderWidth: 2, // Value in pixels
        outerPaddingSize: 5, // Value in pixels
    });
</script>
```

To entirely remove the outermost border and padding, set both options to `0` like so:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        outerBorderWidth: 0, // Value in pixels
        outerPaddingSize: 0, // Value in pixels
    });
</script>
```

This approach can work well in combination with a wrapper element to style the widget more seamlessly within your existing page. In your page's HTML, include a wrapper element around the target element:

```markup
<form>
    <label>Name:
        <input type="text" name="fullname" />
    </label>
    <label>Email:
        <input type="email" name="email" />
    </label>
    <div id="your-wrapper-to-style">
        <div id="target-element-id"></div>
    </div>
    <input type="submit" name="continue" value="Continue" />
</form>
```

You will now be able to specify custom border, padding, margin, and other styles on the wrapper element.

**Please note:** Openli regularly update the widget to provide improved legal compliance and a better user-experience. You must therefore **not** assume that the contents of the widget will never change, and **you must not constrain the height** of the widget.

#### Explicitly marking required fields

You can choose to show an asterisk next to required fields so users can visually determine which fields are required. This can be done by specifying the following option:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        markRequiredFields: true,
    });
</script>
```

This will include an asterisk after a required field, as seen below:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-LqaKDBZi7-Foj9nwQhs%2F-LqaMyxB9HdykirFwCmi%2FScreenshot%202019-10-07%20at%2015.19.11.png?alt=media\&token=7767aebc-7a18-46e1-b990-ee8435d3e2a1)

Required fields in our widget also have annotations to help assistive technologies like screen-readers to guide their users more accessibly.

### Collect additional user information

The widget also enables you to collect your users' **name** and **email** when they sign up to help identify them, using the `nameInputSelector` and `emailInputSelector` options, respectively. This naturally assumes that your form contains input fields for name and email address.

Using our example form, the following options will target the name and email fields using CSS selectors:

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        nameInputSelector: '[name="fullname"]', 
        emailInputSelector: '[name="email"]',
    });
</script>
```

The widget will then associate the values from those input fields with the consent the user gives. You may use either or both of these options, so if you only collect an email address, you can use only the `emailInputSelector` option.

**Note:** Collecting name and email does not need to be done when your user signs up. Please see the next section for more information.

#### Collect user information separately

The `legal.user()` method lets you attach a full name and an email address to the current user independently of collecting consent. When using this method, the user will be updated in our system with the name and email you define.

**Note:** To use the current version of this method, you must also call `legal.load()` as shown below.

```javascript
<script>
    legal.load("Your widget's public-key");

    legal.user({
        name: "John Doe",
        email: "john.doe@example.com",
    });
</script>
```

Of course, if your form already provided this information to the consent widget, there is no need to provide it again. However, `legal.user()` is useful if the user changes their email address or their name.

### Control of existing consent checkboxes

If you are integrating with a form that already has one or more checkboxes to indicate consent to a particular type of agreement, you can specify that legal.js should control them. This can be useful for providing immediate integration with your existing systems.

The currently-supported categories for consent collection are:

* Terms of service
* Privacy policy
* Email marketing

For a form with the following structure:

```markup
<form>
    <label for="acme-terms">I agree to ACME's terms of service</label>
    <input type="checkbox" name="acme-terms" id="acme-terms">

    <label>I agree to ACME's privacy policy
        <input type="checkbox" name="acme-privacy">
    </label>

    <span id="email-marketing-label">
        Yes, I want to receive email marketing from ACME
    </span>
    <input
        type="checkbox"
        name="acme-email-marketing"
        aria-labelledby="email-marketing-label"
    >

    <div id="target-element-id"></div>

    <input type="submit" name="signup" value="Sign up">
</form>
```

This would be the appropriate configuration to control the existing checkboxes, using the `controlledConsentFields` option of `legal.widget()`:

```javascript
legal.widget({
    type: "signup",
    widgetPublicKey: "Your widget's public-key",
    targetElementSelector: "#target-element-id",
    controlledConsentFields: {
        // Any CSS selector that matches a single element in your form may be used.
        termsOfService: "#acme-terms",
        privacyPolicy: '[name="acme-privacy"]',
        emailMarketing: '[aria-labelledby="email-marketing-label"]',
    },
})
```

Using this option will also **automatically hide the checkbox field and any semantically-related labels in the same form**, making integration as simple as possible. The labels that will be hidden are:

* Labels that wrap the checkbox.
* Labels that have a `for` attribute with a value corresponding to the label's `id` attribute.
* Any other elements (e.g. `span`) acting as labels that have an `id` attribute corresponding to an `aria-labelledby` attribute on the checkbox.

### Validation

We perform basic front-end validation to ensure that the user has given the required consent for your form to be submitted.

However, for security reasons, when you process the submitted form on your server, you should validate that the form input named `-penli-consent` has a value of `on`, the [default value of a checkbox](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value).&#x20;

#### Defining the name of the validation field

If required, you can set the name of the validation field by specifying the `validationFieldName` option.

```javascript
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        validationFieldName: "consent-validation",
    });
</script>
```

In this example, the name of the validation input field would not be the default `openli-consent`, but `consent-validation`.

### Specifying which buttons legal.js should watch

By default, all submit-buttons in your form will be watched by legal.js, to ensure that the user gives consent before submitting. This table gives an overview of the standard behaviour of buttons in a form, and whether legal.js watches them:

| Example button within `<form>`                  | Can submit form? | Is watched by default? |
| ----------------------------------------------- | ---------------- | ---------------------- |
| `<input type="submit" value="Submit" />`        | **Yes**          | **Yes**                |
| `<input type="reset" value="Reset" />`          | No               | No                     |
| `<button>Submit</button>`                       | **Yes**          | **Yes**                |
| `<button type="submit">Submit</button>`         | **Yes**          | **Yes**                |
| `<button type="">Submit</button>`               | **Yes**          | **Yes**                |
| `<button type="button">Non-submitting</button>` | No               | No                     |
| `<button type="reset">Non-submitting</button>`  | No               | No                     |

There are situations when this might not be what you want. Using the `submitButtonSelectors` option you can provide a [standard CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) that matches only the button, or buttons, that legal.js should watch.

This option uses the [standard `Document.querySelectorAll()` method](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll) internally, and **it supports any element**, so you can target clickable non-button elements if you use those instead of standard buttons to submit your form.

**Important:** when using the `submitButtonSelectors` option, legal.js will watch **only the elements that are matched** by the selectors you provide, and will **not include** your form's default submit buttons if they do not match.

#### When your form has multiple submit-buttons

You might want to implement consent in a form with multiple submit-buttons, only some of which should be watched by legal.js. For example, you might have an "Update items" button that does not enter the checkout flow, and therefore does not require that the user gives consent to your agreements.

```markup
<form>
    <div id="target-element-id"></div>
    <button name="updateItems">Update items</button>
    <input type="submit" name="checkout" value="Go to checkout" />
</form>
```

In this case, you probably do not want the "Update items" button to be dependent on the user consenting to your agreements.

By setting the `submitButtonSelectors` option to an appropriate CSS selector, you can target only the button (or buttons) that legal.js should watch:

```markup
<script>
    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        // Matches all `input` elements anywhere within
        // a `form` element, and only when the `input` has
        // a `name` attribute with the value "checkout".
        submitButtonSelectors: 'form input[name="checkout"]',
    });
</script>
```

#### When your submit-button is outside your form

It is also possible to specify that legal.js should watch one or more buttons *outside* your form. Simply use an appropriate CSS selector to select the button(s).

For a document structure like this:

```markup
<form>
    <div id="target-element-id"></div>
    <button name="updateItems">Update items</button>
</form>
<input type="submit" name="checkout" value="Go to checkout" />
```

You might pass `submitButtonSelectors` an appropriate selector like so:

```markup
<script>
    legal.widget({
        type: "submit",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        // Matches all `input` elements anywhere within
        // the document, and only when the `input` has
        // a `name` attribute with the value "checkout".
        submitButtonSelectors: 'input[name="checkout"]',
    });
</script>
```

You can of course use the flexibility of CSS selectors to match buttons inside *and* outside your form, by using multiple selectors:

```markup
<script>
    legal.widget({
        type: "submit",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#target-element-id",
        // Matches all `button` elements anywhere within
        // the document, and only when the `button` has
        // a `name` attribute with the value "checkout".
        // Also matches all `input` elements anywhere within
        // a `form` element, and only when the `input` has
        // a `type` attribute with the value "submit".
        submitButtonSelectors: 'button[name="checkout"], form input[type="submit"]',
    });
</script>
```

It is important to test that the selectors you pass to the `submitButtonSelectors` option match **only** the buttons you want legal.js to watch, and that they match **all** of them.

You can perform a simple test by using the [standard `Document.querySelectorAll()` method](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll) in your browser console, passing it the same selectors that you intend to pass to `submitButtonSelectors` and verifying that the list of matched elements is what you expect.


# CSS styling options

Here is a detailed guide for how to style various aspects of the consent collecting widget.

### General color inheritance

The text in our widget inherits the color value from higher up in the cascade. This will default to black or what the default value set by the browser is, if a specific value is not defined. This will apply to all elements except when an error occurs. Error-related text will use our default error-color.

**If your styles are not applied** as you expect, it is likely due to the selector specificity not being high enough. Increasing the specificity will make your styles be applied, instead of our default ones. The following resources cover this in more detail: [CSS Specificity (MDN)](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) and the ["Specifishity" cheat-sheet](https://specifishity.com/).

### Font-sizing and line-spacing

You are able to control the font-sizing and line-spacing of our widget. In practice, our widget inherits both font-sizing and line-spacing higher up in the cascade if defined. If no values are defined for font-sizing and line-spacing, both will use our default values.&#x20;

### Styling the border and checkmark of our checkboxes

You can style the border-color of the checkboxes and the color of the checkmark in our widget. To do this, add rules like the following to your stylesheet:

```css
.lm-base .lm-checkbox {
    /* set the color of the checkbox border */
	border-color: #abc123;	
}

.lm-base .lm-checkbox::after {
    /* set the color of the checkmark; inherits from checkbox border if not specified */
    border-color: #abc123;
}

```

You are free to choose if you want to control both the border-color and checkmark color. If you do not set a value, both will default to use our standard border-color.

### Styling error-related text

To change the color of error-related text in the widget, add a rule like this to your stylesheet:

```css
.lm-base .lm-error {
    /* set the color of error-related text, and of invalid/unchecked required fields */
    color: #abc123;
}
```

### Styling the asterisk on required fields

If you have set the `markRequiredFields: true` option in `legal.widget()` , you can style the color of the asterisks that are shown after required fields. Add the following rule to your stylesheet:

```css
.lm-base .lm-required-field {
    /* set the color of the asterisks shown after required fields */
    color: #abc123;
}
```

If you do not specify a color, it will be inherited from our default error-color. If you have overridden that, your specified error-color will be used.


# Collect cookie consent

## Integration

{% hint style="info" %}
This guide assumes that you have successfully created your cookie-widget in the Openli app, and have its JavaScript snippet ready to integrate.
{% endhint %}

### Adding the cookie-consent widget to your site

To collect cookie-consent with legal.js, you must embed the widget using its generated JavaScript snippet.

The snippet must be included **immediately before the closing-tag of the `body` element**, like this:

```javascript
...
    ...
        <script>
            !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();
        
            legal.widget({
                type: "cookie",
                widgetPublicKey: "Your cookie-consent widget's public-key",
            });
        </script>
    </body>
</html>
```

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. [This reference article](https://javascript.info/onload-ondomcontentloaded) provides a good overview of the events involved. Contact us if you are in doubt.

### Next steps

{% content-ref url="/pages/-MG3l3FsNnDUXmu\_I24e" %}
[Blocking cookies](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies)
{% endcontent-ref %}

{% content-ref url="/pages/-M779BQYONQGh\_jcLPbW" %}
[Cookie-widget options](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/cookie-widget-options)
{% endcontent-ref %}


# Blocking cookies

This guide will show you how to manually block all your current cookies, such they are only activated when users have given the correct consent.

legal.js currently uses **manual categorisation** to properly block cookies that are set on your website, so **you must make changes to your HTML** for blocking to work. In future, an automatic option will be available that will not require this step.\
\
This guide outlines the concept of blocking cookies manually, by example of a Google analytics script, but the concept should be easily transferrable to any other script.

{% hint style="info" %}
**Necessary cookies** will always be enabled, so there is no need to categorise scripts that set them, **unless** those scripts also set cookies in another category. If that applies to a script on your website, you should categorise the script appropriately (e.g. as setting analytics cookies).
{% endhint %}

## Step 1: Get an overview

To ensure that cookies set by scripts are properly blocked or allowed, you must update how you include  scripts on your website. They will normally look something like this example for the Google analytics snippet:

```javascript
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
```

## Step 2: Edit scripts

Now that you know which scripts you have on your site, you must edit *each one* to the following:&#x20;

* Add the `type` attribute with value `text/plain` *(or changing it, if already present)*
* Add a `data-cookieconsent` attribute with a value of either `analytics` or `marketing` based on the type of cookie the scripts set.&#x20;

Both these changes are applied to the `<script>`-tag, like so:

```javascript
<script type="text/plain" data-cookieconsent="analytics">
...
</script>
```

The example above would look like this when correctly updated to add the extra attributes for **analytics** to the scripts:

```javascript
<!-- Google Analytics -->
<script
    type="text/plain"
    data-cookieconsent="analytics"
>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
```

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Blocking embedded media

{% hint style="info" %}
If your site embeds external media, such as a YouTube video, you might need to prevent the media from loading until consent has been given for any cookies the media sets.

As with all external resources that your site includes, you should check with the service that provides it to determine what, if any, cookie consent is required to present it to your users.
{% endhint %}

## Example: Blocking an embedded YouTube video

Assume that you have embed code like this from YouTube:

```markup
<iframe width="560" height="315" src="https://www.youtube.com/embed/Y7dpJ0oseIA" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
```

You can make its activation conditional on consent to a particular category, in this example the `marketing` category, by using the following pattern, and replacing the embed code where indicated:

```markup
<script type="text/plain" data-cookieconsent="marketing">
    (function(embedCode) {
        document
            .currentScript
            .nextElementSibling
            .closest(".legalmonster-embed-container")
            .innerHTML = embedCode;
    })(
        // Replace the code between the single quotes
        // with your embed code, keeping it on one line.
        '<iframe width="560" height="315" src="https://www.youtube.com/embed/Y7dpJ0oseIA" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
    );
</script>
<div class="legalmonster-embed-container">
    <!-- The embedded media will be inserted in this div. -->
</div>
```

More advanced integration is possible using this pattern as a foundation, for example including a still image from an embedded video, or adding a placeholder message.

In the future, we hope to introduce a more automated and streamlined way to control embedded third-party content.


# Cookie-widget options

## Standard options

{% content-ref url="/pages/-MK4o\_hfmuZCtVxZIdRW" %}
[Set the widget language](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/setup-widget-language)
{% endcontent-ref %}

## Customisation options

Additional options are available to style your cookie widget, and to choose whether to show the Openli branding, when subscribing to our [Cookie Essential, Cookie Business or Consent Management Suite](https://www.legalmonster.com/pricing/).

You can find these options by clicking the "Widgets" item in the dashboard menu, and then clicking the "Customise your widget" button for the widget you wish to change.


# Consent state API

An easy way to get the current cookie consent state.

## Retrieving the cookie consent state

When users have selected their preferences for consent, Openli will store a record of their consent choices.&#x20;

In some cases, you might want to have a look at the given consent, so you can do (or not do) certain actions related to consent choices. We've made an easy way for you to get access to the cookie consent state by using a simple JavaScript command (which can be used in all scripts with access to the browser's`window` object):&#x20;

```javascript
window.legal.getCookieConsentState(); 
// Returns an object like:
// { analytics: true|false, marketing: true|false }
```

### Use cases

#### Google Tag Manager

A common use case for this API call is with Google Tag Manager, e.g. making triggers fire only under certain conditions. For an in-depth example, check out [Prevent triggers from firing in Google Tag Manager](https://docs.legalmonster.com/integrations/how-to-use-google-tag-manager-with-legal-monster/prevent-triggers-from-firing-in-gtm).

## Listening for consent-change events

It is also possible to register standard JavaScript DOM event-listeners to enable your own code to respond when a user changes their consent preferences.

{% hint style="info" %}
To ensure that your code is run as you intend, you must register listeners **before your call to`legal.widget(...)` for the cookie widget** on your page.
{% endhint %}

| Event name                               | Event description                                                                                |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `legalmonster.cookie.analytics.accepted` | Triggered whenever a user gives consent to the `analytics` category. Can occur more than once.   |
| `legalmonster.cookie.analytics.rejected` | Triggered whenever a user rejects consent to the `analytics` category. Can occur more than once. |
| `legalmonster.cookie.marketing.accepted` | Triggered whenever a user gives consent to the `marketing` category. Can occur more than once.   |
| `legalmonster.cookie.marketing.rejected` | Triggered whenever a user rejects consent to the `marketing` category. Can occur more than once. |

Here is an example of using one of these events to invoke some custom code:

```javascript
function handleAnalyticsAccepted() {
    console.log("User accepted analytics.");
    // Take any other action you want to.
}

window.addEventListener(
    // The event name to listen for.
    "legalmonster.cookie.analytics.accepted",
    // A reference to your custom function.
    handleAnalyticsAccepted,
    // Optional: remove the listener after the first instance of the event.
    { once: true }
);
```


# API

Our API gives you the ability to integrate with Openli and automate your compliance.

## About

Our API returns **JSON** objects on all requests. To understand the core concepts used to describe our API, read our [dictionary](https://docs.openli.com/docs/getting-started-1/dictionary) before starting to integrate.&#x20;

### Authentication

We use a simple API key as the authentication for our API. Include the API key as a header in the requests.&#x20;

{% hint style="success" %}
Pass the API key with the `x-api-key` header:`x-api-key: 3NmuXfi3Qt94t1Y8ZkoUzrzs`
{% endhint %}

We have a few API calls that don't require an API key as they are public API's, these require a project\_public\_key instead.&#x20;

On all API resources we have specified what key are required to authenticate the API.

### Access the API

The API only respons to HTTPS requests, if you request the API on the HTTP protocole we will redirect you to the HTTPS endpoint, so please ensure that you will always request the HTTPS protocole to save redirects.

The API is located at `https://app.openli.com/api/v1/`.

###


# Consents

API access to consents in openli.

## Withdraw email marketing consent

<mark style="color:green;">`POST`</mark> `https://app.openli.com/api/v1/consents/withdraw_all_email_marketing_consent`

Whenever a user unsubscribes from a newsletter you must use this endpoint to ensure that your audit trail is up-to-date and that the user's email marketing consent is withdrawn

#### Query Parameters

| Name  | Type   | Description           |
| ----- | ------ | --------------------- |
| email | string | The email of the user |

#### Headers

| Name      | Type   | Description  |
| --------- | ------ | ------------ |
| x-api-key | string | Your API key |

{% tabs %}
{% tab title="200 The request was successful, but no user found with the requested e-mail" %}

```
{ "message": "No e-mail marketing consent for specified user" }
```

{% endtab %}

{% tab title="204 The request was successful and the consent is withdrawn" %}

```
```

{% endtab %}
{% endtabs %}


# Services

List all your available services.

## List all services for your company

<mark style="color:blue;">`GET`</mark> `https://app.openli.com/api/v1/services`

This endpoint can be used to retrieve the names and public-key identifiers for all of the services your company offers as a vendor.

#### Headers

| Name                                        | Type | Description               |
| ------------------------------------------- | ---- | ------------------------- |
| X-API-Key<mark style="color:red;">\*</mark> |      | API key for your project. |

{% tabs %}
{% tab title="200: OK An example response" %}

```javascript
[
    {
    	"name": "Example service 1",
    	"public_key": "123456789adbfc"
    },
    {
        "name": "Example service 2",
        "public_key": "123456789adbfd"
    }
]
```

{% endtab %}
{% endtabs %}


# Personal data

List all personal data for a specific service in your project

## List all personal data for a given service

<mark style="color:blue;">`GET`</mark> `https://app.openli.com/api/v1/services/:service_public_key/personaldata`

You can find a specific service's public key under settings in the app.&#x20;

**Example request:**

`https://app.openli.com/api/v1/services/123456789adbfc/personaldata`

#### Path Parameters

| Name                                             | Type | Description                               |
| ------------------------------------------------ | ---- | ----------------------------------------- |
| 123456789adbfc<mark style="color:red;">\*</mark> |      | The public key of the particular service. |

#### Headers

| Name                                        | Type | Description                   |
| ------------------------------------------- | ---- | ----------------------------- |
| X-API-Key<mark style="color:red;">\*</mark> |      | API key set for your project. |

{% tabs %}
{% tab title="200: OK An example response" %}

```javascript
{
    "personal_data": [
        {
            "sensitivity_type": "ordinary",
            "category": "Email, name, IP",
            "subjects": "Employees",
            "purpose": "We do this because...",
            "nature_of_processing": "The way we process it is...",
            "data_processing_locations": [
                {
                    "country_name": "Denmark",
                    "country_code": "DK"
                },
                ...
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}


# Subprocessors

List all subprocessors for a specific service in your project.

## List all subprocessors for a given service

<mark style="color:blue;">`GET`</mark> `https://app.openli.com/api/v1/services/:service_public_key/subprocessors`

You can find a specific service's public key under settings in the app.&#x20;

**Example request:**

`https://app.openli.com/api/v1/services/123456789adbfc/subprocessors`

#### Path Parameters

| Name                                             | Type | Description                               |
| ------------------------------------------------ | ---- | ----------------------------------------- |
| 123456789adbfc<mark style="color:red;">\*</mark> |      | The public key of the particular service. |

#### Headers

| Name                                        | Type | Description                   |
| ------------------------------------------- | ---- | ----------------------------- |
| X-API-Key<mark style="color:red;">\*</mark> |      | API key set for your project. |

{% tabs %}
{% tab title="200: OK An example response" %}

```javascript
{
    "subprocessors": [
        {
            "usage_description": "This subprocessor is used for...",
            "subprocessor_name": "Subprocessor name",
            "subprocessor_description": "A service that processes data for us",
            "vendor_name": "Vendor name",
            "vendor_address": "Vendor address",
            "data_processing_locations": [
                {
                    "country_name": "Denmark",
                    "country_code": "DK"
                },
                ...
            ]
        },
        ...
    ]
}
```

{% endtab %}
{% endtabs %}


# Webhooks

Access your webhooks though the API to mange them.

## Event types

Webhooks are fired as fast as possible after the event have taken place in our system. These are the supported events:

* **consent\_created:** fired when a consent is created.&#x20;
* **consent\_withdrawn:** fired when a consent is withdrawn.

## List all webhooks

<mark style="color:blue;">`GET`</mark> `https://app.openli.com/api/v1/webhooks`

List all webhooks on the project.

#### Headers

| Name      | Type   | Description  |
| --------- | ------ | ------------ |
| x-api-key | string | Your API key |

{% tabs %}
{% tab title="200 " %}

```javascript
[
  {
    "webhook_endpoint": {
      "public_key":"TRNQzTKQvTxmShKZ4CFyWjdN",
      "target_url":"https://cool.webhook",
      "events":[
        "consent_created",
        "consent_withdrawn"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  },
  {
    "webhook_endpoint": {
      "public_key":"sDdyTHgDDx4YDYNW5p9hEjMw",
      "target_url":"https://cool.webhook/2",
      "events":[
        "consent_created"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  }
]
```

{% endtab %}

{% tab title="403 " %}

```javascript
{ "message": "API key not found" }
```

{% endtab %}
{% endtabs %}

## Add a webhook

<mark style="color:green;">`POST`</mark> `https://app.openli.com/api/v1/webhooks`

#### Query Parameters

| Name        | Type   | Description                                                                                         |
| ----------- | ------ | --------------------------------------------------------------------------------------------------- |
| target\_url | string | The URL that the webhook should trigger.                                                            |
| events      | string | The events that the webhook should be activated on. If multiple events separated them with a comma. |

#### Headers

| Name      | Type   | Description  |
| --------- | ------ | ------------ |
| x-api-key | string | Your API key |

{% tabs %}
{% tab title="200 " %}

```javascript
[
  {
    "webhook_endpoint": {
      "public_key":"TRNQzTKQvTxmShKZ4CFyWjdN",
      "target_url":"https://cool.webhook",
      "events":[
        "consent_created",
        "consent_withdrawn"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  },
  {
    "webhook_endpoint": {
      "public_key":"sDdyTHgDDx4YDYNW5p9hEjMw",
      "target_url":"https://cool.webhook/2",
      "events":[
        "consent_created"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  }
]
```

{% endtab %}
{% endtabs %}

## Delete a webhook

<mark style="color:red;">`DELETE`</mark> `https://app.openli.com/api/v1/webhooks/:public_key`

#### Path Parameters

| Name        | Type   | Description                     |
| ----------- | ------ | ------------------------------- |
| public\_key | string | The public\_key of the webhook. |

#### Headers

| Name      | Type   | Description  |
| --------- | ------ | ------------ |
| x-api-key | string | Your API key |

{% tabs %}
{% tab title="200 The method returns a empty page on 200." %}

```
```

{% endtab %}

{% tab title="403 " %}

```javascript
{ "message": "API key not found" }
```

{% endtab %}
{% endtabs %}


# Cookies set by Openli

Details about the cookies set by Openli's services

### Cookies set by the Openli cookie-consent widget

#### Cookie name

`isPrimaryDomain`

#### Cookie purpose and data collected

Used to find the highest level within this domain that a cookie can be set on, e.g. example.com when the page is [www.example.com](http://www.example.com). Contains the string "yes" when successfully set, and is deleted immediately after it is set.

#### Cookie name

`legalmonster-cookie-consent`

#### Cookie purpose and data collected

Used to remember the user's settings for cookie consent. Contains a JSON object with entries representing a consent project in Openli, each of which contains the cookie-consent state for that project in the current browser.

#### Cookie name

`legalmonster-pages-viewed`

#### Cookie purpose and data collected

Used to count the number of pages a visitor has viewed on a given site to know when to request consent to certain categories of cookies. Contains a number representing the number of pages viewed.

#### Cookie name

`legalmonster-user`

#### Cookie purpose and data collected

Used to associate consent with a particular user. Contains a JSON object with entries representing a consent project in Openli, each of which contains a unique user identifier within that project, and associated timestamps to control the lifecycle of the user identifier.

#### Cookie name

`legalmonster-consent-cache`

#### Cookie purpose and data collected

Used to remember when a user has given consent to a particular agreement to avoid asking them again. Contains identifiers for the agreement revisions that the user has consented to in the current browser.

### Other cookies set only on \*.openli.com domains

#### Cookie name

`_legalmonster_session`

#### Cookie purpose and data collected

Used to identify sessions and allow our customers to log in to the Openli web application. Contains an encrypted session identifier.


# Cloudflare

{% hint style="warning" %}
If your website uses Cloudflare, you might need to explicitly allow access for our cookie-scanner. This guide explains how to do that from your Cloudflare account.
{% endhint %}

## Allowing Openli's cookie-scanner to access your website

By default, Cloudflare protects your website against automated scans. We are in the process of becoming listed as a known "good bot" with Cloudflare. Until they have completed that process, you might need to add a bypass rule to your Cloudflare account, to prevent their service from blocking our cookie-scanner.

To explicitly allow Openli's cookie-scanner to access your website, you should:

1. Log in to your Cloudflare account
2. Select your website, if multiple websites are shown
3. Click the **Firewall** menu-item
4. Click the **Firewall Rules** tab
5. Click the **Create a Firewall Rule** button
6. Name the new rule, for example "Allow Openli cookie-scanner"
7. In the "*When incoming requests match...*" section:
   1. set **Field** to **User Agent**
   2. set **Operator** to **contains**
   3. in **Value**, type **LegalMonster** (exactly as written here; no quotes, no spaces, and capital L and M)
8. In the "*Then...*" section:
   1. set **Choose an action** to **Bypass**
   2. set **Choose a feature** to **Browser Integrity Check**
9. Click the **Save** button

Our cookie-scanner should now be able to scan your site. You can see an screenshot of a correctly configured rule here:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MHKo6RyrMJobbiR06Bz%2F-MHL1GdWIA13aoEvUihI%2FCloudflare%20bypass%20BIC%20for%20Legal%20Monster%20cookie-scanner.png?alt=media\&token=6bb6d7e8-8e7f-40e7-9283-4313d6e6b130)


# Google Consent Mode

{% hint style="danger" %}
Openli **has no current plans** to add support for Google's **Consent Mode v2** at any point.

If you require support for Consent Mode v2, we recommend that you choose an alternative cookie-consent solution.
{% endhint %}

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## What is Google Consent Mode?

Google Consent Mode (GCM) is a new API (currently in beta), which helps you to adjust the behaviour of some Google services based on the consent status of your users.

Overall, it helps to run your website’s marketing and advertising, while respecting users' consent choices.

Google Consent Mode was launched on [September 3rd, 2020](https://blog.google/products/marketingplatform/360/measure-conversions-while-respecting-user-consent-choices/). It is another big step in the direction of a more privacy-focused Internet. GCM builds a more sustainable future - where advertisement and data collection are still possible, but much more based on user consent.

So, it is a win-win: websites can still access some data and generate revenue and at the same time respect user privacy.

For example, with the help of Google Consent Mode, you can [indicate whether consent was granted](https://support.google.com/analytics/answer/9976101?hl=en) for Analytics and Ads (marketing) cookies. If there is no consent, some basic data will still be passed to Google products, but ads will be much less targeted.

You can read much [more about Google Consent Mode here](https://support.google.com/analytics/answer/9976101?hl=en).

## How to setup GCM to control Google Analytics with Openli.

To make Google Consent Mode work with Openli is not too difficult.

{% hint style="info" %}
Be aware that this only works if you are using GA4. This will likely not work with UA (the old Google Analytics).
{% endhint %}

You simply need to make sure the google datalayer is initialised and that it sets the consent states as *"denied"* **before** the Google analytics and the Openli scripts are loaded. You can do this by adding this HTML to the `head` block of your site:

```html
<script>
    // Initialize the data layer for Google Tag Manager (this should mandatorily be done before the Cookie Solution is loaded)
    window.dataLayer = window.dataLayer || [];
    function gtag() {
        dataLayer.push(arguments);
    }
    // Default consent mode is "denied" for both ads and analytics, but delay for 5 seconds until the Cookie Solution is loaded
    gtag("consent", "default", {
        ad_storage: "denied",
        analytics_storage: "denied",
        wait_for_update: 5000 // milliseconds
    });
    // Improve ad click measurement quality (optional)
    gtag("set", "url_passthrough", true);
    // Further redact your ads data (optional)
    gtag("set", "ads_data_redaction", true);
</script>
```

Secondly you will need to unblock the GA script in your Google Tag Manager if you already blocked it using the Openli triggers, as GCM is used instead of those, and they conflict with it.\
\
If you set up GA using a script directly in the code and blocked it manually, you will need to remove this blocking.

Once this is done you are good to go.\
\
Openli pings the data layer to change the settings for `ad_storage` and `analytics_storage` and either grant or deny data-storage and -collection, so our widget will take care of the rest. If done correctly, you should start to see data coming in.\
\
To check if the cookies are now not being set, you can open a private session in your browser ("Incognito mode"), and open the developer tools (`F12` or `ctrl`+`shift`+`i`). Without giving consent, browse your website a little. If set up correctly, you shouldn't see the `_ga`, `_gid`, or `_gat` cookies being set in the cookie or storage related section of the developer tools.

### My data is not looking right after setting this up.

So at this point you've taken the steps above, and everything looks to be doing what it should, but you do not see the data you expect.\
\
Unfortunately, because Google Consent Mode is just an API which Openli uses to pass consent data to Google Tag Manager, the specific details of how the different tags are meant to respond to this data is beyond our control.\
\
We have no insight into what tags do with these settings due to the relatively black-box approach Google has taken, which means that we can't say anything about how Google Analytics (or another tag) should behave when it receives the Consent Mode instructions.\
\
If you want to learn more, you can [visit Google's developer documentation here](https://developers.google.com/gtagjs/devguide/consent).

## Relevant Caveats using GCM in beta

Be aware that there are a few important caveats to keep in mind when using Google Consent Mode.

1. Google Consent Mode is still in Beta from Google, meaning it is still subject to change and issues with the method can be unsolved. Openli has set it up to specification, but we cannot guarantee functionality if Google makes changes or if consent is not collected due to issues with GCM.
2. Based on the information provided by Google, it looks like using GCM is compliant, however, we cannot know for sure if Google is following GDPR rules completely, hence using GCM might not be GDPR compliant.

With those caveats in mind, it does look like it is safe to use GCM from a compliance perspective, but until any real information is available on the matter from the data authorities, no guarantees of compliance can be made.


# Google Tag Manager

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## In this guide...

* You can read a brief overview of what [Google Tag Manager](https://marketingplatform.google.com/about/tag-manager/) is and how you can use it with Openli.&#x20;
* If you already know Google Tag Manager is, you can skip the first part and jump directly to[ the integration guide.](https://docs.openli.com/docs/legacy-integrations/how-to-use-google-tag-manager-with-legal-monster/block-cookies-with-gtm)&#x20;

## What is Google Tag Manager?

Google Tag Manager (GTM) is a tool that organises all the third-party tags on your website (like Google Analytics or Facebook pixels), and also controls when these are triggered and set.&#x20;

Tags can be statistical scripts or marketing tags that are meant for advertisement. Such tags and scripts set cookies, which collect data from your users. You must therefore collect consent before such cookies are set on your website.&#x20;

The advantage of Google Tag Manager is that you can administre your tags/cookies without editing your source code or get help from a developer.

### Google Tag Manager and Openli

Openli, if installed correctly, blocks all cookies and trackers until a user has given their consent. If you use Google Tag Manager, Openli can specify which tags are set based on your user's consent settings in our cookie consent widget.&#x20;

For example, if a user has not given consent to marketing cookies, Openli prevents any tag categorised as *marketing* in Google Tag Manager to be set. By using Openli, you can ensure that  cookies set on your website through Google Tag Manager are compliant with data protection laws governing the use of cookies.&#x20;

You can watch this video from Google that shows you how to use Google Tag Manager:

{% embed url="<https://youtu.be/P4suvDuj0kI>" %}


# Block cookies with GTM

Openli supports Google Tag Manager, which is an easy way to integrate your cookie consents. This guide shows you how to block cookies with Google Tag Manager.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Blocking cookies

When using Openli with Google Tag Manager, you can easily block out external cookies when users have not given consent and activate the cookies again when the user has given consent. If you do not block cookies, based on your users consent, your solution is not compliant.&#x20;

This guide will show you how to get started blocking your cookies.&#x20;

## What cookies do I use?

Good question! It can be very difficult to get an overview over, which cookies you use on your site. Openli automatically scan your site, and tells you what cookies you use. To see the cookies, that Openli has found on your site navigate to '**Cookies**' from the side menu in the dashboard.

![In this example, the site uses cookies from Hotjar, Google Analytics, Hubspot, Twitter e.g.](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MT_3OdwOyfiOOz7CIwq%2F-MT_8npaWYVl4e34UXv8%2FScreenshot%202021-02-15%20at%2011.05.35.png?alt=media\&token=3fe29fd7-5a65-4bef-92d2-d1108b6e8f87)

## How do I set cookies using Google Tag Manager?

There are different ways to set cookies on your site. If you use a website builder, you might have installed plugins, which can set cookies. You might also have added custom code often by copy-and-pasting a `<script>`-code block into your source code.&#x20;

To use Google Tag Manager, you must instead copy this custom code into a Google Tag. Google Tag Manager already has some[ predefined implementation](https://support.google.com/tagmanager/answer/6106924), where you only need to setup the tag in Google Tag Manager, without any code. Google Tag Manager also supports [custom code](https://support.google.com/tagmanager/answer/6107167), if you do not find your scripts or script provider in the predefined list. You can read more about what tags are, and how to use them with Google Tag Manager in Google's own [help center](https://support.google.com/tagmanager/?hl=en#topic=3441530).&#x20;

Once you cookies and scripts are set up in Google Tag Manager, you must remove the `</script>` from the source code of your website, and only keep the Google Tag manager code.&#x20;

## Before you start:

Before following these steps, please be sure that you have:

* A [Google Tag Manager](https://tagmanager.google.com/) account
* [Installed Google Tag Manager on your site](https://www.youtube.com/watch?v=P4suvDuj0kI)
* [Installed Openli's cookie-consent solution](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster) on your page

## Step 1: Create triggers to set cookies

As mentioned previously, you must have consent for your users *before* you can set your cookies. Openli will handle all of this for you, if you integrate with Google Tag Manager. In Google Tag Manager, you need to create *triggers* for when to set which cookies.&#x20;

First you must create a custom trigger in Google Tag Manager. Triggers define how and when to run a certain script/tag - *cookies*. Click on "Triggers" in the side panel and click on "New".

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MGcCoeHSy9oC-U9AgVx%2F-MGcLvL5hcUrIbkdSkV3%2FScreenshot%202020-09-07%20at%2013.37.21.png?alt=media\&token=f16a36ee-124d-4af6-a0a1-2ab83b93e98a)

You need to assign triggers to both your analytics and marketing tags. There is no need to add any triggers for when analytics or marketing consent is rejected, because our widget handles this internally. We only trigger your tags when the user has consented to a given category.

Click on editing pen icon and select *Custom Event* as trigger type from the side panel menu.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MGcCoeHSy9oC-U9AgVx%2F-MGcON51x0-mu7im2hBH%2FScreenshot%202020-09-07%20at%2013.48.25.png?alt=media\&token=b08554a0-dfe8-4047-956b-d3812b312d7e)

Hereafter, you're asked to provide an event for your trigger. With Openli you have two event names:

| Event name                               | Description                                                                                                                                                |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `legalmonster.cookie.analytics.accepted` | This event is fired when a user gives consent to analytical cookies, and on every page-load when the user has already given consent to analytical cookies. |
| `legalmonster.cookie.marketing.accepted` | This event is fired when a user gives consent to marketing cookies, and on every page-load when the user has already given consent to marketing cookies.   |

![A trigger for the marketing cookies](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MGcCoeHSy9oC-U9AgVx%2F-MGcPX3BD2CVrM5K1_xy%2FScreenshot%202020-09-07%20at%2013.52.50.png?alt=media\&token=0c153884-f6ab-4867-8609-d4951284ca94)

Save your trigger. Remember, you must create a trigger for marketing cookies and another trigger for analytics cookies.&#x20;

For your marketing trigger, you must use the `legalmonster.cookie.marketing.accepted` event name and for analytics you must use the `legalmonster.cookie.analytics.accepted` event name.&#x20;

## Step 2: Configure your tags

You now need to edit your tags, so they are triggered by your newly created trigger. Go through each of your tags. Once you've selected a tag, you must associate it with the appropriate trigger, i.e. analytics trigger for analytical cookies and marketing trigger for marketing cookies.

![Editing the tag for HubSpot and assigning it the trigger "Accepted analytical cookies"](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MT_3OdwOyfiOOz7CIwq%2F-MT_xBkznaddrM-5UXWD%2FScreenshot%202021-02-15%20at%2014.49.46.png?alt=media\&token=a0ecae17-f9f8-4d65-a503-9e1d1f820a61)

![Available tags if you created the Openli triggers as described in step 1](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MGcCoeHSy9oC-U9AgVx%2F-MGg_eMX4N7hzC9WwihC%2FScreenshot%202020-09-07%20at%2014.34.34.png?alt=media\&token=65c14080-2249-4ee8-b835-c47540d8beed)

Lastly, in the bottom of the Tag Configuration window, you'll see a checkbox for "*Enable overriding settings in this tag*", which you must check.

### Example - Google Analytics

For example, this guide shows you how to setup [Google Analytics](https://analytics.google.com) tag with the appropriate trigger.&#x20;

From the trigger type overview select "Google Analytics - Universal" and from track type select "Event".&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MGcCoeHSy9oC-U9AgVx%2F-MGgZfqV9QjDWMcGIUEK%2FScreenshot%202020-09-07%20at%2014.35.34.png?alt=media\&token=68e0822e-349b-43a1-87ee-567ba1bc0098)

In the bottom of the Tag Configuration window, you'll see a checkbox for "Enable overriding settings in this tag", which you must check. Fill out the "Tracking Id" text field with your Google Analytics tracking Id.&#x20;

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Install Openli with GTM

This guide will show you how you can install our cookie widget using Google Tag Manager. This way, you don't need any developer experience or change the source code of your site.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Openli Cookie Pop-up&#x20;

You need your widget's install code to follow this guide. To find this code snippet, navigate to "Widgets" and click on "Install" for the widget, you wish to use.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FEZRHmUoFNb91QhMFJBtg%2FScreenshot%202021-11-22%20at%2011.16.17.png?alt=media\&token=9eea62e0-3811-4d10-aec0-99b00fabcb11)

This is the code you'll need in this guide. We will refer to it as your "Openli **code snippet".**

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F55AmjjmZrEmL6ycwo3O8%2FScreenshot%202021-11-22%20at%2011.16.24.png?alt=media\&token=2342414e-8981-4bd3-bc4e-1dc041bafa92)

## Before you start:

Before following these steps, please be sure that you have:

* A [Google Tag Manager](https://tagmanager.google.com/) account
* [Installed Google Tag Manager on your site](https://www.youtube.com/watch?v=P4suvDuj0kI)
* Your Openli code snippet

## Step 1: Create a tag for the cookie widget

First you must create a tag for your cookie widget. Go to your Google Tag Manager dashboard and select "Add new tag". Choose **Custom HTML** for your tag type:

![You must select "Custom HTML" as your tag type.](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MTuY6TxgWi1fy5pddtW%2F-MTuZVeWrIbXPQcai3ke%2FScreenshot%202021-02-19%20at%2014.49.40.png?alt=media\&token=4d946e17-98d8-41ee-8418-dde5807ebfaf)

Now you must paste your cookie code snippet in your tag:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MTuY6TxgWi1fy5pddtW%2F-MTuZi37RxnVIGU580ZR%2FScreenshot%202021-02-19%20at%2014.51.39.png?alt=media\&token=5356c7da-44b9-456d-bcda-e863645e5b8d)

Lastly, you must setup a trigger for the Openli tag.

## Step 2: Create trigger

The trigger for Openli must be of the type *"Page view - DOM Ready"*, which means that the widget will load *after* all other content on your site.&#x20;

Press "Choose a trigger" and create a new trigger with the type **"DOM ready"**:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MTuY6TxgWi1fy5pddtW%2F-MTu_N3o1Pr9iTD9zmHW%2FScreenshot%202021-02-19%20at%2014.58.06.png?alt=media\&token=54d77bd5-fc16-45ec-aaf4-0b6793f2bc3f)

When you press save, you'll see that this trigger is now associated with your Openli tag:

![This is a correct setup for installing Openli with Google Tag Manager](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MTuY6TxgWi1fy5pddtW%2F-MTu_aNppLFtkUZM2FMv%2FScreenshot%202021-02-19%20at%2014.53.07.png?alt=media\&token=8e661925-087b-46dc-bc58-e4a9f3618473)

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Prevent triggers from firing in GTM

How to prevent triggers from firing, if consent has not been given on certain or all cookie categories.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

We have developed an API, which returns the current cookie consent state. This API can be used in a GTM Custom JavaScript variable to decide whether or not a trigger should fire.&#x20;

## Creating a variable&#x20;

First step is to create a new variable, and select variable type `Custom Javascript`.

In the created variable, paste following snippet:

```javascript
function() { return legal.getCookieConsentState().analytics; }
```

{% hint style="info" %}
For marketing triggers, simply replace the **`analytics`** property in the snippet with the **`marketing`** property.
{% endhint %}

![Custom JavaScript Variable example.](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MVuwg15pM9LcWKyoFcw%2F-MVv017t8_vqicQXLglK%2FSk%C3%A6rmbillede%202021-03-16%20kl.%2013.30.12.png?alt=media\&token=8b39a94d-c521-416d-800a-58e36493f243)

After pasting the snippet, save the variable with a name of your choosing.

## Using the variable with a trigger

Select your desired tag, and then add or edit a trigger. \
In your trigger, choose the option like `Some <actions>` under `This trigger fires on`.

In the conditional selection list that appears, choose your newly created Custom Variable (will be by the name you have given it).

The next selection box should be set to `equals`.

Lastly, write `true` in the last box. &#x20;

Save the trigger, and publish.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MVvAF7LlqCdsU5485SO%2F-MVvAjrBkRCcUGTSKcQ8%2FSk%C3%A6rmbillede%202021-03-16%20kl.%2014.17.07.png?alt=media\&token=ff8886a6-b110-4bf4-99fc-1a2eecd92836)

Your selected triggers will now only fire when user has consented to chosen categories.


# HubSpot

This guide explains how to integrate the Openli cookie widget on a site that is hosted by HubSpot.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Requirements

1. A Openli cookie widget, with a published cookie policy, ready to install
2. A website hosted on HubSpot

## Integrating Openli on a HubSpot-hosted site

### Step 1: Activate HubSpot's (non-compliant) cookie-consent banner

HubSpot do not currently provide an adequate way for us to communicate consent status to their own platform, so **you must activate HubSpot's built-in cookie-consent banner.** Openli's cookie widget will then use this behind the scenes, supplementing our own consent management, and providing the best current level of integration with HubSpot.

[HubSpot have a general guide to enabling their banner here](https://knowledge.hubspot.com/reports/customize-your-cookie-tracking-settings-and-privacy-policy-alert), and your cookie-banner settings should look like this:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MT0SGKD2UpwAPvwc0Zy%2F-MT0f3cZ4AdlzSEhRuNj%2FHubSpot%20cookie%20settings.png?alt=media\&token=b8020f20-da76-4485-9f95-7d2eacdea5ec)

{% hint style="warning" %}
HubSpot's built-in cookie-consent banner, when used on its own, is **not sufficient to ensure compliance with the GDPR** and other similar privacy laws. Using Openli's cookie-consent widget helps to close this compliance gap.
{% endhint %}

### Step 2: Add code to your site to integrate Openli and HubSpot

Add this code to the **head** (**not** the footer) of your site, [following HubSpot's general guide](https://knowledge.hubspot.com/cos-general/how-can-i-add-code-snippets-to-the-head-and-footer-html-of-my-pages):

```markup
<style>
    /* Hide the HS cookie-banner.
    It is controlled through the LM widget instead. */
    #hs-eu-cookie-confirmation {
        display: none !important;
    }
</style>
<script>
    // These will be set to true if the user has already consented when
    // the events below are run.
    var analyticsConsent = false;
    var marketingConsent = false;

    function handleConsent() {
        // If the user accepts both analytics and
        // marketing, HubSpot's cookies can be set.
        if (analyticsConsent && marketingConsent) {
            // Get a reference to the HubSpot cookie-banner's accept button.
            acceptButton = document.querySelector("#hs-eu-confirmation-button");
            // If the button exists (a decision was not already taken), click it.
            acceptButton && acceptButton.click();
        }
    }

    // Listen for acceptance of analytics consent.
    window.addEventListener(
        "legalmonster.cookie.analytics.accepted",
        function() {
            analyticsConsent = true;
            handleConsent();
        }
    );
    // Listen for acceptance of marketing consent.
    window.addEventListener(
        "legalmonster.cookie.marketing.accepted",
        function() {
            marketingConsent = true;
            handleConsent();
        }
    );
  
    // If either analytics or marketing consent is refused or revoked,
    // trigger HubSpot's cookie-refusal method.
    function refuseHubSpotCookies() {
        // HubSpot documentation:
        // https://developers.hubspot.com/docs/methods/tracking_code_api/remove_cookies
        var _hsp = window._hsp = window._hsp || [];
        _hsp.push(["revokeCookieConsent"]);
    }
    // Listen for rejection of analytics consent.
    window.addEventListener(
        "legalmonster.cookie.analytics.rejected",
        function() {
            analyticsConsent = false;
            refuseHubSpotCookies();
        }
    );
    // Listen for rejection of marketing consent.
    window.addEventListener(
        "legalmonster.cookie.marketing.rejected",
        function() {
            marketingConsent = false;
            refuseHubSpotCookies();
        }
    );
</script>
```

{% hint style="success" %}
Because HubSpot provide only an "accept all"/"reject all" option for their cookies, consent must be given to analytics *and* marketing cookies before HubSpot's cookies can be enabled.\
\
We strongly recommend using the option in your Openli cookie widget to **present an "Accept all" button to users**, to make it simpler to opt in to the categories HubSpot use.
{% endhint %}

### Step 3: Add the Openli cookie-consent widget to your site

Add code like this, from your cookie-widget settings, to the **footer** (**not** the head, unlike before) of your site, [following HubSpot's general guide again](https://knowledge.hubspot.com/cos-general/how-can-i-add-code-snippets-to-the-head-and-footer-html-of-my-pages):

```markup
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "...",
    });
</script>
```

{% hint style="info" %}
The approach used in the guide is very similar to [HubSpot's own recommendation](https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Managing-HubSpot-cookies-when-you-use-a-third-party-cookie/m-p/385911) for integrating third-party cookie-consent solutions like Openli. We therefore expect HubSpot to continue to support it, but all changes they make are outside our control.
{% endhint %}


# Pardot

Below is a quick guide to integrate Openli with Pardot forms. This guide is a bit technical, so if you need any help, just contact us.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Create the form

First create the form with the fields you wish to have, then preview the form and show the source code of the page. Look for a `div` that looks like this (the value of the `id` will be different):

```markup
<div id="error_for_565452_167532pi_565452_167532" style="display:none"></div>
```

Save the `id` of the `div`.

## Add legal.js to the form

To integrate with Pardot forms first go to the "Look and Feel" settings on the form where you wish to integrate Openli. Click "Above Form" and then the "Show Source" icon.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-Lb8x7lcSe_ZY-TCqfgs%2F-Lb8xqOap9X4BekzbfLL%2Fimage001.png?alt=media\&token=f0dbbf10-4c1b-4862-8910-b5787db6fa5a)

In this code view you need to add the following Openli script:

```markup
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "signup",
        widgetPublicKey: "Your widget's public-key",
        targetElementSelector: "#<<SAVED ID FROM DIV>>",
        insertMode: "after"
    });
</script>
```

Set the `widgetPublicKey` option to the public-key of the signup widget you want to use, and replace `<<SAVED ID FROM DIV>>` with the `id` you copied in the first step of this guide, ensuring that the `#` remains as the start of the value for `targetElementSelector`.

Now you should see your Openli signup widget displayed just above the submit button.

## Save the user's name and email

To ensure that we save the user's name and email after they submit the form, navigate to the "Completion Actions" settings for the form. Click "Thank You Code".

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-Lb8x7lcSe_ZY-TCqfgs%2F-Lb8zY9DCxsFOO84bHsK%2Fimage002.png?alt=media\&token=8ee86756-53d1-40c7-9c69-d2c0e4062cf5)

Paste the following code in, replacing `<<PROJECT PUBLIC KEY>>` with your project's public-key.:

```markup
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.load("Your widget's public key", {
        identifier: "%%email%%"
    });
    legal.user({
        name: "%%first_name%% %%last_name%%",
        email: "%%email%%"
    });
</script>
```


# Shopify

This guide is designed to help customers installing our widgets on your Shopify based website. Follow these few simple steps to get up and running quickly.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

Openli can handle both cookie consent and service signup consent for your Shopify shop. Choose the guide for the Openli product, you wish to integrate.&#x20;

{% content-ref url="/pages/-MIrlFGtpsOn\_6SI-oX8" %}
[Install cookie widget](https://docs.openli.com/docs/legacy-integrations/shopify/install-cookie-widget)
{% endcontent-ref %}

{% content-ref url="/pages/-MIrlM35Bmc2JsnPa0OP" %}
[Integrate consent with checkout](https://docs.openli.com/docs/legacy-integrations/shopify/integrate-consent-with-checkout)
{% endcontent-ref %}


# Install cookie widget

This guide is designed to help customers install our cookie widget on their Shopify based website. Follow these few simple steps to get up and running quickly.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Before you start:

Before following these steps, please be sure that you have:

* [ ] Added your website's URL (*either during the signup process or in the settings page*)
* [ ] [Created cookie providers and categorised all cookies](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-2-create-your-cookie-providers)
* [ ] [Created a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)
* [ ] [Created a cookie widget](<  https://docs.legalmonster.com/how-to-guides/how-to-create-a-cookie-widget>)
* [ ] [Block Cookies](#undefined)

Check step 1 - 4 in the [Get started with Openli](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster) guide to creating all of the above.&#x20;

## Step 1: Code snippet

To install your widget, you'll need your cookie widget code snippet.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F55AmjjmZrEmL6ycwo3O8%2FScreenshot%202021-11-22%20at%2011.16.24.png?alt=media\&token=2342414e-8981-4bd3-bc4e-1dc041bafa92)

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
Notice that the value for `widgetPublicKey` will be different in your code snippet
{% endhint %}

## Step 2: Add custom code&#x20;

To insert the code snippet on your page, go to your Shopify dashboard and select "Online store" in the side menu. From the dropdown menu select "Themes".&#x20;

To add custom code to your theme, you must select "**Edit code**" from the actions menu:&#x20;

![Select Edit code from the dropdown menu](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIroTuTxr9YuaVvgj2J%2FScreenshot%202020-10-05%20at%2010.11.06.png?alt=media\&token=e310482b-efe8-457b-aa53-3c862f9e2d72)

You'll now enter Shopify's code editing interface.&#x20;

## Step 3: Edit theme.liquid

To correctly install the cookie widget, you must enter the widget code snippet in the file name "theme.liquid".&#x20;

Select "theme.liquid" from the list of files in the editor:

![The editor screen when "theme.liquid" is selected](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIrpSumuUD5L4rq8kYj%2FScreenshot%202020-10-05%20at%2010.16.53.png?alt=media\&token=9b68fd50-3926-4f77-8075-f2ec63b09fa4)

The cookie widget code snippet will need to go right before the **closing** \<body>-tag of your code. Navigate to the bottom of the code and insert your code snippet.&#x20;

![The highlighted code is your cookie widget code snippet. ](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIrqpnpw5Ydj6d1NNpD%2FScreenshot%202020-10-05%20at%2010.22.39.png?alt=media\&token=930d703f-c77f-477d-a824-c21409d33bb4)

Remember to save once you've added the code snippet.&#x20;

## Block Cookies

Finally it is important that you don't forget to block any non-necessary cookies. It is extremely important to do this as you would otherwise be setting cookies before you collect consent.\
\
You can block cookies in two different ways. Either manually or via GTM if you use that to set the cookies.\
\
Guides can be found here for GTM:\
[Blocking Cookies with GTM](https://docs.legalmonster.com/system-specific-integration-guides/how-to-use-google-tag-manager-with-legal-monster/block-cookies-with-gtm)\
\
And here for manual blocking:\
[Blocking Cookies Manually](https://docs.legalmonster.com/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies)

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pad your self on the back and know that our mascot Li is proud of you.

&#x20;&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Integrate consent with checkout

This guide is designed to help customers gather consent when customers checkout from their Shopify shop.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Before you start:

Before following these steps, please be sure that you have:

* [ ] Created a privacy policy and terms of service agreement
* [ ] Created a signup for a service widget

## Step 1: Code snippet

To install your widget, you'll need your widget code snippet.

![The code snippet is in the text area in the lower right corner](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIs5nJYQ0RE-lA1_8gu%2FScreenshot%202020-10-05%20at%2011.32.05.png?alt=media\&token=a536741c-0578-4454-9f34-9e733f0121d4)

To find your code snippet, go to the Openli dashboard and select "**Widgets**" in the side menu. Click on the Signup-widget you previously created and copy the code.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "signup",
        widgetPublicKey: "xxxxxxxxxxxxxx",
        targetElementSelector: "#legalmonster-signup-xxxxxxxxxxxx",
    });
</script>

<div id="legalmonster-signup-xxxxxxxxxxxxxxxx"></div>

```

{% hint style="info" %}
Notice that the value for `widgetPublicKey` will be different in your code snippet
{% endhint %}

The code snippet consists of two elements: the \<script> code and a \<div> element. The \<div> element is replaced by our consent element, and thus must be placed where you wish to collect consent.&#x20;

{% hint style="warning" %}
Your code snippet might need customisation to fit your page. Make sure you've about read all the [options available in the consent widget](https://docs.openli.com/docs/documentation/legaljs-widget/consent).&#x20;
{% endhint %}

## Step 1: Integrate with your cart

There are a few places you need to hook into to enable Openli to work with Shopify. The first place is your cart, which you must edit in the theme code. Go to "Online Store", then "Themes", and then click "Actions" and select "Edit code".

![Select Edit Code from the dropdown menu. ](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIroTuTxr9YuaVvgj2J%2FScreenshot%202020-10-05%20at%2010.11.06.png?alt=media\&token=e310482b-efe8-457b-aa53-3c862f9e2d72)

Where your cart's template code is stored depends on the theme. In the default theme "Debut" it is located in a file called `cart-template.liquid`.

When you have located the template code for your cart, you should add the code snippet:

![The highlighted code is the Openli code snippet.](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIs7Oq1DDKpBALz3Tzl%2FScreenshot%202020-10-05%20at%2011.39.36.png?alt=media\&token=9dcf05f7-1728-4894-8d81-4d2a2cbfe6d6)

{% hint style="warning" %}
The target element for consent collection (the `<div>` in the example above) must be within the cart's `form` element.
{% endhint %}

Remember to save your changes.&#x20;

## Extra: Saving additional details after checkout

To reliably identify the user and ensure that their consent is properly associated with them, we need to add some code to your checkout completion page. This is done under "Settings", then "Checkout", where you should find the section called "**Order processing**".

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MIri7DUHlNCF_Vis-Fr%2F-MIs8kgo8VE2TyZhp0oF%2FScreenshot%202020-10-05%20at%2011.44.31.png?alt=media\&token=649fb5ed-12f2-49c4-8dcc-0e2e18eaabf5)

You should see an input field for "Additional scripts", and that is where you should customise and insert the following code:

```markup
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.load("Your widget's public key", {
        identifier: "{{ customer.id }}",
        locale: "en-us",
    });
    legal.user({
        name: "{{ customer.name }}",
        email: "{{ customer.email }}",
    });
</script>
```

## Done!&#x20;

Congratulations on completing your first step towards collecting compliant consent. Pad your self on the back and know that our mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Square Online

This guide is designed to help customers installing our cookie widget on their Square Online website (part of SquareUp.com). Follow these few simple steps to get up and running quickly.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## Before you start

Before following these steps, please be sure that you have:

1. Added your website's URL (*either during the signup process or in the settings page*)
2. [Created cookie providers and categorised all cookies](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-2-create-your-cookie-providers)
3. [Created a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)
4. [Created a cookie widget](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget)

Check step 1 - 4 in the [Get Started with Openli ](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster)guide to create all of the above.

## Step 1: Code snippet

To install your widget, you'll need your cookie widget's code snippet.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F55AmjjmZrEmL6ycwo3O8%2FScreenshot%202021-11-22%20at%2011.16.24.png?alt=media\&token=2342414e-8981-4bd3-bc4e-1dc041bafa92)

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
The value for `widgetPublicKey` will be **different in your code snippet**.
{% endhint %}

## Step 2: Add your Openli widget to your Square Online site

In your Square Online dashboard, navigate to the **Tracking Tools** page (previously called **Integrations**), as shown in the screenshot below:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MYPjDGGUYbvaL0yMQ8C%2F-MYPjpJcZYxCmgT_q_Ss%2Fimage.png?alt=media\&token=2b994551-6669-4300-bdf6-2f6644ad0735)

Expand the **Cookie banner** section, shown in the screenshot below, and paste your cookie widget snippet:

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MYPjDGGUYbvaL0yMQ8C%2F-MYPkOJLG-sThQqMF88r%2Fimage.png?alt=media\&token=029b3f6b-707d-460b-8307-1c2e11bb2434)

After you paste your snippet, the page will validate the code, save it, and update your site immediately.

{% hint style="success" %}
You should now see your cookie widget on your site!
{% endhint %}

### Advanced

If you have added any custom code under the **Add custom header code** option, you might need to update that code to ensure that cookies are blocked. [Follow our blocking guide](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/blocking-cookies) to stay compliant.

## Step 3: Blocking cookies <a href="#step-3-blocking-cookies" id="step-3-blocking-cookies"></a>

The final step you need to take to make sure your cookies are compliant is to block any scripts that set them on your website, so the widget can enable them only when a visitor gives consent.

This step is a bit more technical, and our guide shows you [how to categorise the scripts that set cookies on your website](https://docs.legalmonster.com/documentation/legaljs-widget/collecting-cookie-consent#categorisation-of-scripts-that-set-cookies-on-your-website) to enable blocking. You might need a developer to help you.

## Done! <a href="#done" id="done"></a>

Congratulations on completing your first step towards collecting compliant cookie consent. Pat yourself on the back, and know that our mascot Li is proud of you.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Squarespace

This guide is designed to help customers installing our cookie widget on their Squarespace based website. Follow these few simple steps to get up and running quickly.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

{% hint style="danger" %}
In order to add Openli (or any other custom code) to your Squarespace website, you must have Premium or Commercial plan on Squarespace
{% endhint %}

## Before you start:

Before following these steps, please be sure that you have:

1. Added your website's URL (*either during the signup process or in the settings page*)
2. [Created cookie providers and categorised all cookies](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-2-create-your-cookie-providers)
3. [Created a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)
4. [Created a cookie widget](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget)

Check step 1 - 4 in the [Get started with Openli ](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster)guide to create all of the above.&#x20;

## Step 1: Code snippet

To install your widget, you'll need your cookie widget code snippet.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F55AmjjmZrEmL6ycwo3O8%2FScreenshot%202021-11-22%20at%2011.16.24.png?alt=media\&token=2342414e-8981-4bd3-bc4e-1dc041bafa92)

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
The value for `widgetPublicKey` will be **different in your code snippet**.
{% endhint %}

## Step 2: Update custom code

To insert the code snippet on your page, click on "**Settings**" in your home menu and select "Advanced" in the dropdown. Finally, click on "Code Injections".

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MG8Wj1_xZT9NFNEwLli%2F-MG8kRgKBvRxgskraXWD%2FScreenshot%202020-09-01%20at%2015.00.59.png?alt=media\&token=6d7f58c3-b97e-4eba-b94a-6ae60a3d24e8)

Add the Openli cookie widget code snippet **as the last piece of code** the text area under "Footer", and click "Save".

## Step 3: Blocking cookies

The final step you need to take to make sure your cookies are compliant is to block the scripts that set them on your website, so the widget can enable them only when a visitor gives consent.&#x20;

This step is a bit more technical, however, this guide shows you [how to categorise the scripts that set cookies on your website](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent#categorisation-of-scripts-that-set-cookies-on-your-website) to enable blocking. You might need a developer to help you.&#x20;

Squarespace does, however, allow you to block their analytics cookies in the home menu. Note that disabling these permanently can [affect your site](https://support.squarespace.com/hc/en-us/articles/360001264507#toc-disable-analytics-and-performance-cookies).&#x20;

To block the Squarespace cookies, you can disable Analytics and Performance cookies:

1. In the Home Menu, click Settings, and then click Cookies & Visitor Data.
2. Check Disable Squarespace Analytics Cookies.
3. Click **Save**.

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pad your self on the back and know that our mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Webflow

This guide is designed to help customers installing our cookie widget on their Webflow based website. Follow these few simple steps to get up and running quickly.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

{% hint style="danger" %}
In order to add Openli (or any other custom code) to your Webflow website, you must have paid plan on Webflow
{% endhint %}

## Before you start:

Before following these steps, please be sure that you have:

* [ ] Added your website's URL (*either during the signup process or in the settings page*)
* [ ] [Created cookie providers and categorised all cookies](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-2-create-your-cookie-providers)
* [ ] [Created a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)
* [ ] [Created a cookie widget](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget)

Check step 1 - 4 in the [Get started with Openli ](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster)guide to create all of the above.&#x20;

## Step 1: Code snippet

To install your widget, you'll need your cookie widget code snippet.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F55AmjjmZrEmL6ycwo3O8%2FScreenshot%202021-11-22%20at%2011.16.24.png?alt=media\&token=2342414e-8981-4bd3-bc4e-1dc041bafa92)

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
Notice that the value for `widgetPublicKey` will be different in your code snippet
{% endhint %}

## Step 2: Add custom code

To insert the code snippet on your page, go to your Webflow project settings and select "Custom code".&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MQRxxVFoU2nei4Q3sPa%2F-MQRyIg0Ql6j3W2wrOyp%2FScreenshot%202021-01-07%20at%2014.11.02.png?alt=media\&token=c66e7015-332e-4ed6-95dd-d43ecb235e8f)

Now go to the "Footer code"-section and insert your snippet.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MQRxxVFoU2nei4Q3sPa%2F-MQRyTi7NYDzPZHI89EW%2FScreenshot%202021-01-07%20at%2014.09.31.png?alt=media\&token=8e534559-eaf3-44e4-8852-0ebb53ae4d86)

Add the Openli cookie widget code snippet in the text area and click save changes.&#x20;

## Step 3: Blocking cookies

The final step you need to take to make sure your cookies are compliant is to block the scripts that set them on your website, so the widget can enable them only when a visitor gives consent.&#x20;

This step is a bit more technical, however, this guide shows you [how to categorise the scripts that set cookies on your website](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent#categorisation-of-scripts-that-set-cookies-on-your-website) to enable blocking. You might need a developer to help you.&#x20;

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent. Pad your self on the back and know that our mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


# Wix

This guide is designed to help customers installing our cookie widget on their Wix based website. Follow these few simple steps to get up and running quickly.

{% hint style="warning" %}
This courtesy guide is **no longer actively tested** by Openli, although it might still work.

Our cookie-consent widget intentionally uses a highly-compatible, highly-generic approach to integration. In most cases, it will be possible for your developers to adapt this guide's steps to any changes that might have been made to the target platform, in combination with their own general documentation. **Our** [**consent-state events**](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent/consent-state-api#listening-for-consent-change-events) **might be useful for this.**
{% endhint %}

## How to add cookie consent on Wix.com?

{% hint style="danger" %}
In order to add Openli (or any other custom code) to wix.com you must have Premium membership on wix.com
{% endhint %}

## Before you start:

Before following these steps, please be sure that you have:

* [ ] Added your website's URL (*either during the signup process or in the settings page*)
* [ ] [Created cookie providers and categorised all cookies](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster#step-2-create-your-cookie-providers)
* [ ] [Created a cookie policy](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy)
* [ ] [Created a cookie widget](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget)

Check step 1 - 4 in the [Get started with Openli ](https://docs.openli.com/docs/cookie-consent-management/get-started-with-legal-monster)guide to create all of the above.&#x20;

## Step 1: Code snippet

To install your cookie widget on Wix, you'll need your cookie widget code snippet.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2F55AmjjmZrEmL6ycwo3O8%2FScreenshot%202021-11-22%20at%2011.16.24.png?alt=media\&token=2342414e-8981-4bd3-bc4e-1dc041bafa92)

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.&#x20;

It will look like this:

```javascript
<script>
    !function(){var i,e,t,s=window.legal=window.legal||[];if(s.SNIPPET_VERSION="3.0.0",i="https://widgets.legalmonster.com/v1/legal.js",!s.__VERSION__)if(s.invoked)window.console&&console.info&&console.info("legal.js: The initialisation snippet is included more than once on this page, and does not need to be.");else{for(s.invoked=!0,s.methods=["cookieConsent","document","ensureConsent","handleWidget","signup","user"],s.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(t),s.push(e),s}},e=0;e<s.methods.length;e++)t=s.methods[e],s[t]=s.factory(t);s.load=function(e,t){var n,o=document.createElement("script");o.setAttribute("data-legalmonster","sven"),o.type="text/javascript",o.async=!0,o.src=i,(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n),s.__project=e,s.__loadOptions=t||{}},s.widget=function(e){s.__project||s.load(e.widgetPublicKey),s.handleWidget(e)}}}();

    legal.widget({
        type: "cookie",
        widgetPublicKey: "xxxxxxxxxxxxxxxxx",
    });
</script>

```

{% hint style="info" %}
Notice that the value for `widgetPublicKey` will be different in your code snippet
{% endhint %}

## Step 2: Add custom code&#x20;

To insert the code snippet on your page, go to "**Settings**" in your Wix website editor. In the dropdown menu select "Tracking & Analytics".&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MG8Wj1_xZT9NFNEwLli%2F-MG8Zrp-JwvmAeN23p9o%2FScreenshot%202020-09-01%20at%2014.09.28.png?alt=media\&token=4d939f3a-637a-4e41-a7bc-f2ca9063ce38)

To add custom code press the "+ New Tool" button and select "Custom" from the dropdown.

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MG8Wj1_xZT9NFNEwLli%2F-MG8b4OuwvBDWDs92gr8%2FWixInstall.png?alt=media\&token=9772265d-2c76-4b19-b019-4ddc647cdae4)

Add the Openli cookie widget code snippet in the text area at the top and fill out the remaining fields. Please make sure that "Load code once" is selected under Add code to pages and that the "Body - start" option is selected under Place Code in.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRMQvUsiQMLNstTU-cS%2F-MG8Wj1_xZT9NFNEwLli%2F-MG8coF8a_V6Bs_CeKLt%2F2._wix_img.jpg?alt=media\&token=16ac633d-4d99-4400-a828-616ffc272fdb)

Once this is done, simply click "Apply" to save your changes.&#x20;

## Step 3: Blocking cookies

The final step you need to take to make sure your cookies are compliant is to block the scripts that set them on your website, so the widget can enable them only when a visitor gives consent.&#x20;

This step is a bit more technical, however, this guide shows you [how to categorise the scripts that set cookies on your website](https://docs.openli.com/docs/documentation/legaljs-widget/collecting-cookie-consent#categorisation-of-scripts-that-set-cookies-on-your-website) to enable blocking. You might need a developer to help you.&#x20;

## Done!

Congratulations on completing your first step towards collecting compliant cookie consent on Wix.com. Pad your self on the back and know that our mascot Li is proud of you.&#x20;

![](https://1919043541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LRMQvUsiQMLNstTU-cS%2Fuploads%2FP5L9Hk7egE96nLzqpVuv%2Fcookie-openli.png?alt=media\&token=cc21774f-ca82-4bf0-9308-2a0b2cf7f9d1)


