Developers

Documentation

Everything to install Consorm, manage consent and integrate your tools, from the first script to exporting the records.

Integrations

Google Analytics and other tools

Add Google Analytics 4 and Meta Pixel through Consorm, understand Consent Mode v2, and condition your tags on consent correctly.

Once the banner is live, your measurement and advertising tools must wait for consent before firing. If you chose the automatic installation, Consorm creates and conditions these tags for you; with the GTM template, you manage them in your own container.

Add Google Analytics 4

  1. 1Get your GA4 measurement ID, in the G-XXXXXXXXXX format (in Google Analytics: Admin → Data streams).
  2. 2In the Consorm dashboard, open your site then the Providers tab.
  3. 3Choose Google Analytics (GA4), paste the measurement ID and confirm.
  4. 4Use Deploy to publish the container update. The tag is live.

The tag created is a native Google Tag Manager GA4 tag, configured to require the analytics_storage signal: it sets no cookie until the visitor accepts the Analytics category. On acceptance, it fires, including on the current page, without a reload.

Add Meta Pixel

Same process with Meta Pixel in the Providers tab: enter your pixel ID (a 6 to 20 digit number, visible in Meta's Events Manager). The tag created requires the advertising signals ad_storage, ad_user_data and ad_personalization: it stays inactive until the Advertising category is accepted.

Consent Mode is the channel through which the banner informs Google tools of the visitor's choices. Consorm implements it in two phases, as Google requires:

MomentSignal sent
Before any tag (initialization)Default state: analytics_storage, ad_storage, ad_user_data and ad_personalization denied; security_storage granted; wait_for_update: 500.
On every visitor decisionA faithful update, signal by signal, according to the accepted or refused categories.

Each decision also pushes the csm_consent_update event into the dataLayer: in the automatic installation, a dedicated trigger re-fires the newly authorized tags without a reload.

What about other tools?

Trackers that do not go through the Providers tab are not out of control for all that: the banner's script blocks at the source the requests of known trackers (analytics, advertising, social networks) as long as their category is not consented, even if they were pasted directly into your pages. The dashboard's cookie detection helps you spot those scripts and attach them to the right category. For a special need, write to us.