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.
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 might be useful for this.
Openli Cookie Pop-up
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.
This is the code you'll need in this guide. We will refer to it as your "Openli code snippet".
Before you start:
Before following these steps, please be sure that you have:
A Google Tag Manager account
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:
Now you must paste your cookie code snippet in your tag:
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.
Press "Choose a trigger" and create a new trigger with the type "DOM ready":
When you press save, you'll see that this trigger is now associated with your Openli tag:
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.
Last updated