Developers

Documentation

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

Getting started

GTM template installation

The manual method for teams that already manage their Google Tag Manager container: import the Consorm template, enter your site ID and publish.

With the template method, Consorm never touches your Google Tag Manager container: you import an official tag template into your own GTM, configure it with your site ID, and publish yourself. It is the method to choose when a team or an agency already manages the site's container.

Prerequisites

  • A GTM container already installed on the site (<head> and <body> snippets in place).
  • Edit and publish access to that container.
  • Your site created in app.consorm.com, with its nine-digit ID shown on the Installation page, GTM template (manual) tab.

A published configuration is required

The banner configuration is published as soon as the site is created. If the Installation page tells you it is not, or if the Consorm tag shows as failed in GTM's Preview, click Deploy, top right of the dashboard, before going on: without a published configuration, the tag finds nothing to load and the banner does not appear.

Step 1: Import the template

  1. 1On Consorm's Installation page, GTM template (manual) tab, download the consorm-consent-template.tpl file.
  2. 2In Google Tag Manager, open Templates → Tag Templates → New.
  3. 3In the top-right corner menu, choose Import, select the .tpl file, then save. The Consorm Consent Optimization template appears among your templates.

Step 2: Create the tag

  1. 1Open Tags → New and choose the Consorm Consent Optimization template.
  2. 2Enter your Consorm site ID (the nine digits).
  3. 3As the trigger, choose Consent Initialization - All Pages. This trigger guarantees the consent instruction fires before all your other tags.
  4. 4Save, without publishing for now: your other tags must be conditioned first (step 3).

Once live, the tag declares the default Consent Mode v2 state (everything denied except security_storage, with wait_for_update at 500 ms), then loads the Consorm banner for your site. The template also offers three optional parameters to change the default of the Marketing, Analytics and Preferences categories; leave them at Denied for a site subject to an explicit-consent law.

Step 3: Condition your own tags

With this method, your GA4, Meta and other tags stay in your container: conditioning them on consent is up to you, and a consent check alone is not enough. Each tag must fire on the banner's csm_consent_update event, rather than on a page load, and require the signals of its category: analytics_storage for analytics, ad_storage, ad_user_data and ad_personalization for advertising. The full procedure, with the trigger to create and the signals by tool type, is in Your tags with the GTM template.

Do not publish before this step

A tag left on a page trigger, including "Consent Initialization", fires before the visitor's choice: Consorm's script arrives asynchronously and cannot hold it back. If the container already contains Google Analytics, Meta or other tags, they must all go through the csm_consent_update trigger before publishing.

Step 4: Verify with Preview

  1. 1Start GTM's Preview in a private window. On the Consent Initialization event, the Consorm tag must be under "Tags Fired" with the "Succeeded" status, and the banner must appear on the site.
  2. 2Before any click, your other tags must be under "Tags Not Fired"; after "Accept all", they fire on the csm_consent_update event.
  3. 3If the Consorm tag shows "Failed", your site's script could not be loaded: check that the consent configuration is published in the dashboard, then that https://cdn-consorm.com is not blocked by an extension, an antivirus or your computer's network.

Step 5: Publish

Publish the container. Consorm's Installation page also offers Verify installation for an automatic confirmation once the container is live.

Tag management

With the template installation, the Providers tab does not appear in the dashboard: your tags belong to you and are managed in your GTM, Consorm does not create any for you. The Deploy button then only publishes the banner configuration.