> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamly.watch/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Tag Manager Plugin

> GTM container on the Streamly storefront — container ID, when to use GTM vs direct GA/Meta plugins.

**Google Tag Manager** (`analytics.google_tag_manager`) is a Streamly **plugin** in the **analytics** category.

Injects your GTM container (`GTM-…`) so marketing can ship tags without redeploying the app. You can still install GA/Meta plugins directly for simpler setups.

## Learn the service

Watch this overview of the vendor platform (helpful before you paste keys into Streamly).

<Frame caption="How to add Google tag with Tag Manager — Google Analytics.">
  <iframe src="https://www.youtube.com/embed/F8_sbW63sH0" title="How to add Google tag with Tag Manager" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
</Frame>

## At a glance

| | |
| - | - |
| **Plugin ID** | `analytics.google_tag_manager` |
| **Primary key** | `containerId` |

## How it works

One container can orchestrate GA4, Pixel, and custom tags. Avoid double-firing the same tag from both GTM and a dedicated plugin.

## Activation keys

Configure in `/admin/plugins` → **Google Tag Manager** → Configure. Secret fields stay server-side — never commit them or expose as `NEXT_PUBLIC_*` unless the key is intentionally public (e.g. Stripe publishable key).

| Key | Label | Required | Docs |
| - | - | - | - |
| `containerId` | Container ID (`GTM-…`) | Yes | [Find ID](https://support.google.com/tagmanager/answer/6103696) |

## Setup guide

<Steps>
  <Step title="Create Web container">Copy `GTM-…`.</Step>
  <Step title="Install plugin">Paste `containerId`.</Step>
  <Step title="Publish GTM workspace">Tags only load after you publish.</Step>
</Steps>

## Official vendor documentation

* [Find container ID](https://support.google.com/tagmanager/answer/6103696)

## FAQ

<AccordionGroup>
  <Accordion title="Should I install GA plugin AND GA via GTM?">
    Pick one path to avoid duplicate pageviews.
  </Accordion>
</AccordionGroup>

## Related

* [GA4](/plugins/google-analytics)
* [Meta Pixel](/plugins/meta-pixel)
* [Plugins Overview](/plugins/overview)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.