Consentlane
← Back to guides
G
Tags

Google Tag Manager (GTM)

Difficulty: Medium Setup time: 5 min

Custom HTML tag in GTM with highest priority. Works, but it is safer to put the snippet directly in <head>.

⚠ Heads up

GTM loads asynchronously - there is a risk GA4/Meta fire BEFORE cl.js sets Consent Mode default=denied. Safer: put cl.js directly in <head> (see the „Plain HTML" case), keep GTM only for the remaining tags.

01

Create a new tag in GTM

Tags → New → Tag Configuration → Custom HTML.

02

Paste snippet

In the HTML field paste:

<script async src="https://consentlane.com/v1/cl.js?s=YOUR_KEY"></script>
03

Set trigger to „All Pages"

Triggering → All Pages (Page View). The trigger must fire EARLY - make sure the type is „Page View" (DOM Ready / Window Loaded are too late).

04

Tag Sequencing (critical)

Advanced Settings → Tag Sequencing → Fire a tag before this tag → select your cl.js tag. ALL GA4/Ads/Meta tags MUST wait for cl.js.

05

Configure GA4 tags for Consent Mode

In your Google Analytics 4 tag → Advanced Settings → Consent Settings → Built-in Consent Checks: select analytics_storage. This tells GTM NOT to fire GA until the user consents (Consent Mode v2 handles the rest).

06

Publish

Submit → Publish. cl.js will now load via GTM on every Page View.

Ready to try? The Free plan is enough to start.

Sign up