---
title: "Install with Google Tag Manager"
description: "Deploy XPmetric via a GTM Custom HTML tag triggered on all pages."
source: "https://xpmetric.com/docs/install/gtm"
---
Use Google Tag Manager when you can't edit theme code directly or want tag management in one place.

<TokenCallout />

## Tracking snippet

<TrackingSnippet />

## Steps

1. Open [Google Tag Manager](https://tagmanager.google.com) for your container.
2. Click **Tags → New**.
3. Tag type: **Custom HTML**.
4. Paste the tracking snippet into the HTML field.
5. Trigger: **All Pages** (or an equivalent init trigger).
6. Save and **Publish** the container.

## Verify

Use GTM Preview mode or visit your site after publish. Pageviews should appear in the XPmetric dashboard live feed.

## CSP note

If your site sets a strict Content-Security-Policy, allow `https://xpmetric.com` in `script-src` and `connect-src`. See [CSP troubleshooting](/docs/troubleshooting/csp).

