Versionv1

Events and API

For categories, states, and who owns what in a stack, see Core concepts.

What this developer portal documents

SurfacePurpose
window.INTABootstrap object before uc.js runs—policy URL, domain, company, optional gtagId, UI options (JSON Schema).
Integration patternsGTM firing order, GA4, Meta, Google Consent Mode (Integrations overview).

Those are the supported integration contracts for building on inta.dev.

When the visitor changes consent (accept, reject, granular update, etc.), the banner pushes an entry to the Google dataLayer array (the same object GTM uses when dataLayer is initialized before GTM loads).

DetailValue
Event namecookie_consent_update
Where it appearsdataLayer — visible in GTM Preview (Data Layer tab) and in the browser after interacting with the banner

Using it in GTM

  1. Triggers → New → Custom Event
  2. Event name: cookie_consent_update (exact match unless you use a regex trigger intentionally)
  3. Attach this trigger to tags that should run when consent changes (e.g. after the user accepts statistics or marketing), in addition to any Consent settings on those tags.

The push includes a data object next to the event (consent-related fields). Do not hard-code assumptions about every property—open GTM Preview, perform a consent action, and read the current Data Layer state for your deployment.

If GTM is not on the page, ensure window.dataLayer = window.dataLayer || [] exists before uc.js when you rely on this event for other consumers.

Programmatic JavaScript API (runtime)

There is no separate public “CMP JavaScript API” documented on this portal (no guaranteed global such as window.IntastellarConsents.* for production use). For GTM, use the cookie_consent_update dataLayer event above. Otherwise:

  • Drive behaviour through window.INTA and uc.js as documented.
  • Use Google Tag Manager (or your stack’s tag layer) for triggers and vendor tags.
  • Rely on vendor consent mechanisms (e.g. Google Consent Mode, Meta consent parameters) where applicable.

If your organisation publishes a versioned runtime API for a specific CDN build or enterprise tier, add its canonical URL to this page’s frontmatter or the documentation home when it is stable.

Practical checklist

  1. Validate consent-driven behaviour with GTM Preview or your bundler’s load order.
  2. Use DevTools (Application → cookies / storage, Network) to confirm tags align with consent before and after choices.
  3. If something must run when consent changes, use a Custom Event trigger on cookie_consent_update (see above) or application code that runs after the CMP—not undocumented globals.

Intastellar Consents passes consent signals into supported stacks when configured so you do not hand-wire every vendor. Platform-specific parameters still follow Google, Meta, Microsoft, etc.—see Integrations overview.

Last updated