C15T Logo

Google Tag Manager

Learn how to integrate c15t with Google Tag Manager (GTM).

Experimental Feature

This feature is currently experimental and subject to change, it's not recommended for production. Try it out and share your feedback on GitHub

Creating a Tag Manager Container

Info

This step is optional if you already have a Tag Manager container. Ensure your container has consent overview enabled.

After signing into Google Tag Manager, you can create a new container. Continue to Google Tag Manager

  1. In Tag Manager, click Admin > Container Settings.
  2. Under Additional Settings, select "Enable consent overview".

Enable consent overview

Setting up c15t with Google Tag Manager

After creating your container, you can set up c15t with Google Tag Manager.

All you need to do copy and paste your container ID into the unstable_googleTagManager.id property.

This begins with "GTM-".

<ConsentManagerProvider
  options={{
    mode: 'c15t',
    backendURL: 'https://your-instance.c15t.dev',
    unstable_googleTagManager: {
      id: 'GTM-XXXXXXX',
    },
  }}
>

If you have GTM in your site already, you can remove the GTM script from your head section.

All Done!

c15t will automatically inject the GTM script into your page and update the consent state in GTM.

Edit on GitHub

Last updated: June 24, 2025