> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/faq/debugging-monitoring/manually-check-whether-the-adpage-gtm-script-loads-correctly.md).

# Manually check whether the AdPage GTM script loads correctly

This article explains how to check that the AdPage custom Google Tag Manager script loads correctly. This check helps troubleshoot tracking issues and verify your server-side tagging setup.

### When to run this check

Run this check when:

* You have just installed the AdPage tagging script.
* Events are not measured correctly in GA4 or other platforms.
* You suspect an ad blocker or firewall blocks the script.
* You want to verify tracking after a website update.
* Support asks you to verify the basic setup.

***

### Method 1: Network tab check

The browser **Network** tab is the most reliable way to confirm the script loads.

#### Step 1: Open Developer Tools

Open your website in Google Chrome or another browser. Press **F12** on Windows or Linux. Press **Cmd + Option + I** on Mac.

#### Step 2: Open the Network tab

Select **Network** in Developer Tools.

#### Step 3: Filter for scripts

Enter `tagging` or `gtm` in the filter field.

#### Step 4: Reload the page

With the **Network** tab open, press **Ctrl + R** on Windows or Linux. Press **Cmd + R** on Mac.

#### Step 5: Check requests

Look for these requests:

| URL to check                                  | Expected status | Meaning                                     |
| --------------------------------------------- | --------------- | ------------------------------------------- |
| `tagging.jouwdomein.nl/gtm.js`                | **200**         | The AdPage custom GTM script loads.         |
| `tagging.jouwdomein.nl/user-data-minified.js` | **200**         | The user data helpers script loads.         |
| `tagging.jouwdomein.nl/gtag/js`               | **200**         | The GA4 script uses a first-party endpoint. |

**Important:** Replace `jouwdomein.nl` with your domain name.

#### Status code meanings

* **200**: The script loaded successfully. ✅
* **404**: The script was not found. Check the tagging subdomain configuration. ❌
* **403**: Access was denied. A firewall or CSP may cause this. ❌
* **CORS error**: A cross-origin issue occurred. Contact Support. ❌

***

### Method 2: Console check

Use the browser console to check whether the GTM container and `dataLayer` initialize correctly.

#### Step 1: Open the Console

Open Developer Tools with **F12**. Then select **Console**.

#### Step 2: Check the dataLayer

Enter this command in the console:

javascript

```javascript
dataLayer
```

**Expected result:** An array of objects appears. Look for events such as `gtm.js`, `gtm.dom`, `gtm.load`, and possibly `trytagging_user_data`.

#### Step 3: Check the GTM container

Enter this command:

javascript

```javascript
google_tag_manager
```

**Expected result:** An object appears with your GTM container IDs as keys, such as `GTM-XXXXXXX`.

#### Step 4: Check taggingHelpers (optional)

If you use the AdPage user data script, check whether the helpers are available:

javascript

```javascript
window.taggingHelpers
```

**Expected result:** An object with functions such as `getMarketingObject` and `getDeviceInfo`.

***

### Method 3: Elements tab check

Check whether the script is present in the HTML.

#### Step 1: Open the Elements tab

Open Developer Tools and select **Elements**.

#### Step 2: Find the script

Press **Ctrl + F** on Windows or Linux. Press **Cmd + F** on Mac. Search for:

```undefined
tagging.jouwdomein.nl
```

**Expected result:** You find a `<script>` tag that references your tagging subdomain:

html

```html
<script src="https://tagging.jouwdomein.nl/gtm.js?id=GTM-XXXXXXX"></script>
```

***

### Checklist: Is everything correct?

Use this checklist to verify that your setup is complete:

* The **Network** tab shows status **200** for `tagging.jouwdomein.nl/gtm.js`.
* `dataLayer` shows an array containing GTM events.
* The `google_tag_manager` object is present in the console.
* The **Console** tab has no red error messages.
* The script tag appears in the **Elements** tab.

***

### Troubleshooting

#### The script returns a 404 error

**Cause:** The tagging subdomain is misconfigured or DNS records are missing.

**Solution:**

1. Check that the domain is connected correctly in the AdPage platform.
2. Verify that `tagging.jouwdomein.nl` has a CNAME record pointing to your AdPage server.
3. Wait 24–48 hours for DNS changes to propagate fully.

#### The script returns a 403 error

**Cause:** A Content Security Policy (CSP) blocks the script.

**Solution:**

1. Add `tagging.jouwdomein.nl` to your CSP allowlist.
2. See the CSP configuration article for platform-specific instructions.

#### dataLayer is undefined

**Cause:** The GTM script does not load correctly or appears too late on the page.

**Solution:**

1. Check that the script is in the `<head>` section.
2. Verify that it loads before other tracking scripts.
3. Check for JavaScript errors that block execution.

#### No GTM events appear in dataLayer

**Cause:** The GTM container ID is incorrect or the container is unpublished.

**Solution:**

1. Check that the script's GTM container ID matches your GTM account.
2. Publish your GTM container if you made recent changes.
3. Use GTM Preview Mode to debug.

#### An ad blocker blocks the script

**Cause:** Some ad blockers block scripts containing specific keywords.

**Solution:**

* A first-party tagging setup through `tagging.jouwdomein.nl` bypasses most ad blockers.
* If the script remains blocked, test without an ad blocker to confirm it.

***

### Advanced debugging

#### Use GTM Preview Mode

Use GTM Preview Mode for in-depth debugging:

1. Open [tagassistant.google.com](https://tagassistant.google.com/).
2. Select **Add domain** and enter your website URL.
3. Select **Connect**.
4. Your website opens in a new tab with debugging information.

**Tip:** Preview Mode shows each fired tag and the data it sends.

#### Check server container requests

To verify that data also reaches the server container:

1. Open the **Network** tab.
2. Filter by your server container domain, such as `tagging.jouwdomein.nl`.
3. Look for POST requests to `/g/collect` or `/j/collect`.
4. Select a request to inspect its payload.

***

### Frequently asked questions

**Do I need to run this check after every GTM change?** No. Run it after major changes or when you suspect an issue. Preview Mode is enough for daily GTM adjustments.

**Can I run this check on mobile?** Desktop browsers make this easiest. For mobile debugging, use remote debugging through Chrome DevTools or Safari Web Inspector.

**What if everything looks correct, but events still do not arrive?** Check the server container with GTM server-side Preview Mode. Verify that it forwards events correctly to GA4, Meta, or other destinations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.adpage.io/faq/debugging-monitoring/manually-check-whether-the-adpage-gtm-script-loads-correctly.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
