# Can't include tracker via Google Tag Manager

{% hint style="info" %}
Including UXWizz through Google Tag Manager is not recommended. \
Google Tag Manager is blocked by ad-blockers, which means that UXWizz will fail to load too.
{% endhint %}

### Problem:

Including the UXWizz tracking script via Google Tag Manager doesn't work.

{% hint style="danger" %}
**Uncaught TypeError: Cannot read property 's' of undefined at ust.min.js?v=3.4.2:2**
{% endhint %}

### Cause:

The issue occurs because when you include multiple scripts via GTM, the include order is not guaranteed.

{% code title="The default way to include UXWizz" %}

```markup
<script>UST_CT = [];UST = { s: Date.now(), addTag: function(tag) { UST_CT.push(tag) } };UST.addEvent = UST.addTag;</script>
<script src="https://your.uxwizz.com/server/ust.min.js?v=x.x.x" async></script>
```

{% endcode %}

{% hint style="info" %}
**With Google Tag Manager, the second \<script> tag might be loaded before the first one.**
{% endhint %}

### Solution:

A quick solution is to use a single script tag and load ust.min.js dynamically like this:

{% code title="Single-script way to include UXWizz" %}

```markup
<script>UST_CT = [];UST = { s: Date.now(), addTag: function(tag) { UST_CT.push(tag) } };UST.addEvent = UST.addTag;
var ust_min_js = document.createElement("script");
ust_min_js.src = 'https://your.uxwizz.com/server/ust.min.js?v=x.x.x';
document.head.appendChild(ust_min_js);
</script>
```

{% endcode %}

{% hint style="warning" %}
Make sure to replace **`https://your.uxwizz.com/server/ust.min.js?v=x.x.x`** with the actual URL to your tracking file.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.uxwizz.com/guides/troubleshooting/tracking/tracker-doesnt-with-google-tag-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
