Openli
IntroductionGetting StartedTechnical DocumentationGet help
  • Getting started
    • Introduction
    • Dictionary
    • FAQ
      • IAB TCF v2.0
  • Privacy hub
    • How to create your privacy profile
    • How can I get an Openli Privacy Badge?
    • Vendor owners
    • Why are custom properties on vendors super valuable?
    • Setting up custom properties
  • Tasks
  • Cookie Consent Management
    • Quickstart
    • Checklist: Cookies
    • Cookie widget
      • Create a cookie policy
      • Create a cookie widget
      • Install the widget
      • Manually add any cookies
      • Customise your widget
      • How to get color codes
      • Set the widget language
      • Use custom link/button instead of Cookie Shield
      • Add company name to cookie pop-up
    • Categorise your cookies
    • Adding information to cookies
    • Adding information to your cookie providers
    • Blocking Cookies with Openli
    • Cookie expiration dates and lifespan
      • Changing expiration on Google Analytics cookies
  • Policy and agreement management
    • Generate your privacy policy
    • Changing an old cookie policy to a new on autopilot
    • Embed your policies and legal agreements
      • Embedding agreements without displaying a widget
    • Install the Privacy Badge
  • General Openli guides
    • Setting up SSO (Single Sign-On)
      • SSO with Azure AD (Microsoft)
      • SSO with Google
      • SSO with Okta
      • How to log in with SSO
    • Add a website to your Openli account
    • Using projects to handle multiple languages
    • Collect consents without storing IP addresses or user-agents
  • Technical documentation
    • Widget
      • Collect cookie consent
        • Blocking cookies
        • Blocking embedded media
        • Cookie-widget options
        • Consent state API
    • API
      • Services
        • Personal data
        • Subprocessors
    • Cookies set by Openli
  • System Specific Integration Guides
    • Cloudflare
  • Legacy integrations
    • Google Consent Mode
    • Google Tag Manager
      • Block cookies with GTM
      • Install Openli with GTM
      • Prevent triggers from firing in GTM
    • HubSpot
    • Pardot
    • Shopify
      • Install cookie widget
      • Integrate consent with checkout
    • Square Online
    • Squarespace
    • Webflow
    • Wix
Powered by GitBook
On this page
  • Openli Cookie Pop-up
  • Before you start:
  • Step 1: Create a tag for the cookie widget
  • Step 2: Create trigger
  • Done!
  1. Legacy integrations
  2. Google Tag Manager

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.

PreviousBlock cookies with GTMNextPrevent triggers from firing in GTM

Last updated 8 months ago

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 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:

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

A account

Google Tag Manager
Installed Google Tag Manager on your site
consent-state events
You must select "Custom HTML" as your tag type.
This is a correct setup for installing Openli with Google Tag Manager