Source: https://usedataowl.com/docs/google-tag-manager
Markdown source: https://usedataowl.com/docs/google-tag-manager.md
Description: Deploy DataOwl web analytics, session replay, and custom event triggers via Google Tag Manager—plus learn when a direct script tag performs better.

# How to Load DataOwl Web Analytics via Google Tag Manager

1. Create a tag of type **Custom HTML** and paste the script.
2. Trigger it on **All Pages** and publish the container.

Ad blockers often block Google Tag Manager itself, and DataOwl with it. Add the script to your HTML directly when you can, or use the [proxy](/docs/proxy-guide).

```html
<script
  defer
  data-website-id="YOUR_SITE_ID"
  src="https://usedataowl.com/js/script.cookies.js"
></script>
```

> Replace `YOUR_SITE_ID` with your site ID from the dashboard.

## Verify installation

After you deploy:

- Visit your live website.
- Open the **Realtime** page of your [DataOwl dashboard](/dashboard). Your visit shows up within a second, and the setup page says "Receiving events".

> DataOwl ignores localhost so you don't count your own development traffic. Add `data-allow-localhost="true"` to the tag to test locally. More options are in the [script configuration reference](/docs/script-configuration).
