UXWizz
WebsitePricingDemoTwitter (X)
  • Introduction
  • 🛠️ Installation
    • Requirements
      • Limitations
      • Server specs (CPU, RAM)
    • Installation guide
      • Uploading the script
      • Creating a MySQL database
      • Running the installer
    • Install on a new server
      • Ubuntu 20.04 (or higher)
      • DigitalOcean
    • Docker
      • Via Docker Compose
      • Standalone Docker image
    • Adding the tracking code
      • Automatic SPA pageview tracking
      • Add tracker to Next.js App
      • Add tracker to React Router App
    • Optimization tips
      • MySQL/MariaDB
      • Auto-delete old data (cron jobs)
      • Apache
    • Frequently Asked Questions
  • 🔧JavaScript API
    • Tags
    • Events
    • Hooks/callbacks
    • Other API functions
    • Session Recording
      • Ignore specific elements
  • 📖Guides and features
    • Goals (NEW!)
    • Ask AI (NEW!)
    • Basic usage
    • A/B testing
    • Usage tips
    • Dashboard user access level
    • Resetting the admin password
    • Database querying
    • Technical details
      • IP Geolocation
    • Troubleshooting
      • Agency
        • MultiDB
      • Dashboard
        • Refreshing dashboard sub-page leads to 404 error
        • Website iframe not loading (x-frame-options)
        • License says "invalid"
        • Updating Fails
      • Tracking
        • No data is being recorded
        • Can't include tracker via Google Tag Manager
        • The A/B test JS file is missing
      • WordPress
        • Cloudways 403 Forbidden screen on WordPress
        • NGINX 403 Forbidden screen on WordPress
    • Extending the dashboard
    • Support
    • Migrating to a new server
  • 🎓Useful Examples
    • Feedback form (polls)
    • Tracking 404 Pages
    • Tracking UTM parameters
    • Tracking Google Ads GCLID
    • Storing user device types
    • Track video playback
  • 📜About
    • Changelog
    • Personal Data Information
    • Privacy Policy (uxwizz.com)
    • Licenses and pricing
    • [Deprecated] License Subscriptions
Powered by GitBook
On this page
  • Problem:
  • Cause:
  • Solution:

Was this helpful?

  1. Guides and features
  2. Troubleshooting
  3. Tracking

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.

Uncaught TypeError: Cannot read property 's' of undefined at ust.min.js?v=3.4.2:2

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>

Make sure to replace https://your.uxwizz.com/server/ust.min.js?v=x.x.x with the actual URL to your tracking file.

PreviousNo data is being recordedNextThe A/B test JS file is missing

Last updated 7 months ago

Was this helpful?

📖