Developers

Documentation

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

Getting started

Automatic installation

The recommended method: Consorm creates and publishes a Google Tag Manager container for you, and you paste two code snippets into your site.

With the automatic method, Consorm creates a Google Tag Manager container dedicated to your site, installs the banner and Consent Mode v2 in it, then publishes it. You do not need a Google account: the container is managed by Consorm. Your only task is to paste the container's code into your site: the same operation as for any GTM.

Step 1: Add your site

  1. 1Sign in to app.consorm.com with your Google account.
  2. 2On the dashboard, choose Add a site and enter your site's address (for example https://example.com).
  3. 3You land on the Installation page. Keep the Automatic (recommended) tab.
  4. 4Launch the container creation. Within seconds, Consorm creates it, installs the banner in it and publishes it; its public ID GTM-XXXXXXX appears.

Step 2: Paste the code into your site

The Installation page shows two snippets, with your GTM-XXXXXXX ID already inserted; copy them from the dashboard rather than from here. The first goes as high as possible in the <head> of every page:

In the <head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
<!-- End Google Tag Manager -->

The second goes immediately after the opening of the <body>:

After <body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

CMS and site builders

WordPress, Shopify, Webflow, Squarespace, Wix and most platforms offer a "header code" field or a script injection zone: paste the <head> snippet there. If your platform does not expose the <body>, the <noscript> snippet can be omitted: it only serves visitors without JavaScript.

Step 3: Verify the installation

Back on the Installation page, use Verify installation: Consorm loads your site in a browser and confirms the banner shows. You can also check manually: open your site in a private window: the banner must appear, and no request to your analytics tools should fire before your choice.

Already had this container?

If the GTM code shown is already present in your pages because you are reinstalling Consorm on an existing site, there is nothing new to paste: the Installation page detects it and simply confirms the container is active.

What comes next