Google Tag Manager Integration

Consent-Based Tag Control via GTM Template

Intastellar Consents provides a dedicated Google Tag Manager template that allows you to integrate the cookie banner directly into your GTM container.

This enables you to control tag execution dynamically based on user consent.

  • No manual hacks.
  • No fragile custom JavaScript glue.
  • No inconsistent consent states.
Get the integration template

What the GTM Integration Does

The integration template:

  • Imports predefined variables and triggers
  • Exposes consent categories inside GTM
  • Allows tag firing to depend on consent state
  • Synchronizes consent updates in real time

Once installed, you can configure tags to fire only when the required consent category is granted.

How Consent-Based Tag Control Works

  1. Intastellar Consents collects user preferences
  2. Consent state is exposed to GTM via the integration template
  3. Custom triggers evaluate consent categories
  4. Tags fire only when their required category is approved
  5. If consent is rejected or withdrawn, tags remain blocked

This ensures that:

  • Tracking scripts do not execute before consent
  • Tags are dynamically enabled after consent
  • Tags remain blocked if consent is declined
  • State changes apply immediately

Pre-Consent Behavior

Before a user grants consent:

  • Non-essential GTM tags do not fire
  • No marketing or analytics scripts execute
  • No advertising cookies are set

Only essential functionality remains active.

Google Consent Mode v2 Compatibility

The GTM integration supports Google Consent Mode v2.

Consent signals such as:

  • ad_storage
  • ad_user_data
  • ad_personalization
  • analytics_storage

are synchronized with the user’s consent preferences.

This allows:

  • Conversion modeling
  • Enhanced conversions
  • Audience building
  • Remarketing

while preventing advertising and analytics cookies from being set before consent.

Designed for Technical Control

The integration is suitable for:

  • Complex Multi-tag GTM setups
  • Multi-domain environments
  • Server-side GTM configurations
  • Advanced marketing stacks

Consent logic remains centralized while tag execution is handled cleanly inside GTM.