# Google Tag Manager

## Add Humblytics Analytics via Google Tag Manager

### 1 · Sign up (or log in)

Visit humblytics.com → Start Free Trial. Finish signup—or log in to your existing workspace.

### 2 · Add your website in Humblytics

In the sidebar, click **Add Website**.

* **Domain** – enter `your-domain.com` (omit `https://` and `www`)
* **Site Name** – internal label (e.g. `Marketing-Prod`)

Copy the snippet from **Install Tracking Code**:

html

```html
<!-- Start Humblytics Tracking Code -->
<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>
<!-- End Humblytics Tracking Code -->
```

Keep this tab open—we'll return and click **Verify Website** once the tag is live.

### 3 · Create the tag in Google Tag Manager

1. Go to your **Google Tag Manager workspace**
2. Click **New Tag** (top right or from Tags menu)
3. Click the tag name at the top and rename it to: **Humblytics Analytics**
4. Click **Tag Configuration** and select **Custom HTML**
5. Paste your Humblytics script:

html

```html
<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>
```

6. Click **Triggering** and select **All Pages**
   * This fires the tag on every page load (recommended for analytics)
   * Alternative: Use specific page triggers if you only want tracking on certain pages
7. Click **Save**

**Note**: Replace `YOUR_ID_HERE` with your actual project ID from Humblytics.

### 4 · Test before publishing (recommended)

1. Click **Preview** in the top right of GTM
2. Enter your website URL and click **Connect**
3. Browse your site—GTM will show which tags fire on each page
4. Verify **Humblytics Analytics** appears under "Tags Fired" on page load
5. Click **Exit Preview Mode** when done testing

### 5 · Publish your container

1. Click **Submit** (top right)
2. Add a version name: `Add Humblytics Analytics`
3. Optionally add a description: `Installed Humblytics tracking script for analytics and A/B testing`
4. Click **Publish**

Your Humblytics tag is now live on all pages using this GTM container.

### 6 · Verify installation

1. Return to Humblytics and click **Verify Website**
2. Open your site in a private/incognito window and refresh once
3. Within \~30 seconds you should see a green **Verified** badge and live visitor count

**If verification fails, check:**

**GTM-specific issues:**

* Container is published (not just saved in draft)
* Your website has the GTM container snippet installed
* Tag is set to trigger on **All Pages** (or the current page you're testing)
* Use GTM Preview mode to confirm the Humblytics tag fires

**General issues:**

* Script ID matches your project in Humblytics
* No ad-blockers or browser extensions are blocking the script
* Check browser console for errors (F12 → Console tab)
* View page source (right-click → View Page Source) and search for "humblytics" to confirm script loads

**Debug in GTM:**

1. Click **Preview** mode in GTM
2. Browse to your site
3. Check if **Humblytics Analytics** appears in "Tags Fired"
4. If not firing, check the trigger configuration
5. If firing but not verifying, check the script ID

### 7 · Explore & optimize

* **Dashboard** – track traffic, top pages, and referrers
* **Heatmaps** – auto-generated click and scroll tracking
* **Experiments** – run A/B tests without extra setup (Experiments → New Test)
