---
title: "Install DataPocket on Google Tag Manager"
description: "Add DataPocket web analytics with revenue attribution to Google Tag Manager. A Custom HTML tag on All Pages."
url: "https://datapocket.vo1d.studio/docs/gtm"
lang: "en"
updated: "2026-11-13"
---

# Install DataPocket on Google Tag Manager

A Custom HTML tag on All Pages. Replace `YOUR_SITE_ID` and `YOUR_DOMAIN` with the values from your site's Install page.

## Steps

1. Tags → New → Tag Configuration → Custom HTML. Paste this. It injects the script so data attributes survive GTM:

```html
<script>
  (function () {
    var s = document.createElement("script");
    s.defer = true;
    s.setAttribute("data-site-id", "YOUR_SITE_ID");
    s.setAttribute("data-domain", "YOUR_DOMAIN");
    s.src = "https://datapocket.vo1d.studio/js/script.js";
    document.head.appendChild(s);
  })();
</script>
```

2. Triggering → All Pages. Save, then Submit/Publish the container.

## Verify

1. Deploy or publish, then open your site in a normal browser window (ad blockers off).
2. In the browser's Network tab, look for a POST to `/api/event` (or `/dp/api/event` when proxied) that returns `{"ok":true}`.
3. The DataPocket Install page for this site switches to "Receiving data" within a few seconds.

## Related guides

- [Wix](https://datapocket.vo1d.studio/docs/wix): Settings → Custom Code (needs a Premium plan and a connected domain).
- [Webflow](https://datapocket.vo1d.studio/docs/webflow): Site Settings → Custom Code → Head code (paid site plan).
- [Bubble](https://datapocket.vo1d.studio/docs/bubble): Settings → SEO/metatags → Script/meta tags in header (paid plan).
- [Squarespace](https://datapocket.vo1d.studio/docs/squarespace): Settings → Advanced → Code Injection → Header (Core plan or higher).
- [AI crawler tracking](https://datapocket.vo1d.studio/docs/ai-bots)
