For the complete documentation index, see llms.txt. This page is also available as Markdown.

Can't include tracker via Google Tag Manager

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.

Problem:

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

Cause:

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

The default way to include UXWizz
<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>

With Google Tag Manager, the second <script> tag might be loaded before the first one.

Solution:

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

Single-script way to include UXWizz
<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>

Last updated

Was this helpful?