CMS UTM Tracking Errors: Platform-by-Platform Fixes

UTMGuard Team
8 min readtechnical-guides

Your CMS is breaking your UTM tracking. Campaign parameters work fine when you test them manually, but when visitors click through from ads or emails, GA4 shows "Direct" traffic.

Each CMS platform has unique UTM tracking issues. Here's how to fix them all.

🚨 Not sure what's breaking your tracking?

Run a free 60-second audit to check all 40+ ways UTM tracking can fail.

Scan Your Campaigns Free

✓ No credit card ✓ See results instantly

WordPress UTM Tracking Issues

Problem: WordPress converts query parameters to path segments.

Check if you have this:

Settings → Permalinks → Custom Structure
Example: /%postname%/%utm_source%/%utm_medium%/

Result:

Your URL: site.com/article?utm_source=facebook
WordPress converts to: site.com/article/utm_source/facebook/

Fix:

1. Go to Settings → Permalinks
2. Select "Post name" structure: /%postname%/
3. Save Changes
4. Test: site.com/article?utm_source=test

Issue 2: Plugin Conflicts

Problem: SEO or caching plugins stripping query parameters.

Common culprits:

  • Yoast SEO (URL cleanup feature)
  • Rank Math (similar feature)
  • W3 Total Cache (aggressive caching)
  • WP Super Cache

Fix:

1. Identify plugin: Deactivate plugins one by one
2. Test UTM URL after each deactivation
3. When tracking works, you found the culprit
4. Check plugin settings for:
   - "Remove query parameters"
   - "Clean URLs"
   - "Strip tracking parameters"
5. Disable these features

Issue 3: Theme URL Modification

Problem: Theme modifying links with JavaScript.

Check theme files:

// functions.php or similar
// Look for code like this:
 
add_filter('the_permalink', 'custom_clean_url');
function custom_clean_url($url) {
    // Removes query parameters
    return strtok($url, '?');
}
 
// ❌ This breaks UTM tracking

Fix: Remove URL cleaning code or modify to preserve UTM parameters.

😰 Is this your only tracking issue?

This is just 1 of 40+ ways UTM tracking breaks. Most marketing teams have 8-12 critical issues they don't know about.

• 94% of sites have UTM errors

• Average: $8,400/month in wasted ad spend

• Fix time: 15 minutes with our report

✓ Connects directly to GA4 (read-only, secure)

✓ Scans 90 days of data in 2 minutes

✓ Prioritizes issues by revenue impact

✓ Shows exact sessions affected

Get Your Free Audit Report

Shopify UTM Tracking Issues

Issue 1: App Interference

Problem: Marketing apps modifying URLs.

Common apps:

  • URL shorteners
  • Social media integrators
  • Email marketing apps
  • SEO optimizers

Fix:

1. Apps → Review installed apps
2. Check each app's URL settings
3. Disable "URL optimization" features
4. Test campaign URLs

Issue 2: Theme JavaScript

Problem: Theme manipulating links for aesthetics.

Check theme code:

// Look for code in theme.liquid or assets/theme.js
 
// ❌ BAD - Strips query parameters
$('a').each(function() {
    var url = $(this).attr('href');
    var cleanUrl = url.split('?')[0];
    $(this).attr('href', cleanUrl);
});

Fix:

1. Edit theme code
2. Preserve UTM parameters:

✅ GOOD:
$('a').each(function() {
    var url = $(this).attr('href');
    // Only clean non-UTM parameters
    if (!url.includes('utm_')) {
        // Your cleaning logic
    }
});

Issue 3: Checkout URL Redirects

Problem: Shopify checkout strips UTM parameters during cart redirect.

Workaround:

// Add to theme.liquid
<script>
// Preserve UTMs through checkout
if (window.location.search.includes('utm_')) {
    sessionStorage.setItem('utmParams', window.location.search);
}
 
// On checkout page, retrieve and send to GA4
if (window.location.pathname.includes('/checkout')) {
    var utms = sessionStorage.getItem('utmParams');
    if (utms && window.gtag) {
        var params = new URLSearchParams(utms);
        gtag('event', 'page_view', {
            campaign_source: params.get('utm_source'),
            campaign_medium: params.get('utm_medium'),
            campaign_name: params.get('utm_campaign'),
        });
    }
}
</script>

Webflow UTM Tracking Issues

Issue 1: CMS Collection URL Structure

Problem: Collection slug templates including UTM variables.

Check:

CMS Settings → [Collection Name] → Settings → URL Structure

❌ WRONG:
/blog/`{"{"}{"{"}slug{"}"}{"}"}}`/`{utm-source}`/`{utm-medium}`

✅ CORRECT:
/blog/`{"{"}{"{"}slug{"}"}{"}"}}`
(Add UTMs in query string when linking, not in structure)

Fix:

1. Remove UTM variables from URL structure
2. Republish site
3. Update collection links to include query strings

Issue 2: Form Redirects

Problem: Form submissions stripping UTMs during redirect.

Fix:

// Add to custom code
<script>
// Capture UTMs on form submission
$('form').on('submit', function() {
    var form = $(this);
    var redirectUrl = form.attr('action');
    var currentParams = window.location.search;
 
    if (currentParams && redirectUrl) {
        var separator = redirectUrl.includes('?') ? '&' : '?';
        form.attr('action', redirectUrl + separator + currentParams.slice(1));
    }
});
</script>

Wix UTM Tracking Issues

Issue 1: Wix URL Structure

Problem: Wix uses hash-based routing which conflicts with UTMs.

Wix URLs look like:

site.wixsite.com/mysite#/page

Adding UTMs:

❌ WRONG:
site.wixsite.com/mysite#/page?utm_source=facebook

✅ CORRECT:
site.wixsite.com/mysite?utm_source=facebook#/page
(UTMs before hash)

Issue 2: Wix Apps

Problem: Wix marketing apps may override UTMs.

Fix:

1. Settings → App Market → Manage Apps
2. Check each marketing app settings
3. Look for "Override tracking parameters"
4. Disable overrides

Squarespace UTM Tracking Issues

Issue 1: URL Slugs

Problem: Squarespace summary blocks rewriting URLs.

Fix:

1. Edit summary block settings
2. URL settings: "Use original URL"
3. Don't use "Clean URLs" option

Issue 2: Marketing Campaigns

Problem: Squarespace Email Campaigns using internal tracking IDs.

Fix:

1. Email Campaigns → Settings
2. Enable "Append UTM parameters"
3. Customize UTM values:
   utm_source=squarespace-email
   utm_medium=email
   utm_campaign=[campaign-name]

Custom/Headless CMS Issues

Issue 1: API Response Formatting

Problem: CMS API returning sanitized URLs (no query parameters).

Check API response:

{
  "url": "https://site.com/article",
  "utm_params": {
    "source": "facebook",
    "medium": "social"
  }
}

Fix in frontend:

// Reconstruct URL with query string
function buildCampaignUrl(apiData) {
    let url = apiData.url;
    if (apiData.utm_params) {
        const params = new URLSearchParams(apiData.utm_params);
        url += '?' + params.toString();
    }
    return url;
}

Issue 2: Server-Side Rendering (SSR)

Problem: SSR frameworks not preserving query parameters during hydration.

Fix (Next.js example):

// pages/_app.js
import { useEffect } from 'react';
import { useRouter } from 'next/router';
 
function MyApp({ Component, pageProps }) {
    const router = useRouter();
 
    useEffect(() => {
        // Preserve UTMs in session
        if (router.query.utm_source) {
            sessionStorage.setItem('utm_source', router.query.utm_source);
            sessionStorage.setItem('utm_medium', router.query.utm_medium);
            sessionStorage.setItem('utm_campaign', router.query.utm_campaign);
        }
    }, [router.query]);
 
    return <Component {...pageProps} />;
}
 
export default MyApp;

Universal CMS Troubleshooting Checklist

For ANY CMS platform:

1. Check URL Structure

□ UTMs in query string (after ?)
□ Not in URL path (no /utm_source/value/)
□ Fragment (#) comes after query string
□ Proper separators (? and &)

2. Check Plugins/Apps

□ Disable SEO plugins temporarily
□ Disable caching plugins temporarily
□ Check marketing app settings
□ Review URL shortener configurations

3. Check Theme Code

□ Search for URL manipulation JavaScript
□ Look for query parameter stripping
□ Check form redirect logic
□ Review link generation functions

4. Check Server Configuration

□ .htaccess rewrite rules (Apache)
□ nginx.conf rewrite rules (Nginx)
□ CDN URL transformation settings
□ Firewall query parameter filtering

5. Test Campaign URLs

□ Create test URL with UTMs
□ Visit in incognito browser
□ Check GA4 Real-Time (< 60 seconds)
□ Verify all UTM parameters appear
□ Check landing page loads correctly

✅ Fixed this issue? Great! Now check the other 39...

You just fixed one tracking issue. But are your Google Ads doubling sessions? Is Facebook attribution broken? Are internal links overwriting campaigns?

Connects to GA4 (read-only, OAuth secured)

Scans 90 days of traffic in 2 minutes

Prioritizes by revenue impact

Free forever for monthly audits

Run Complete UTM Audit (Free Forever)

Join 2,847 marketers fixing their tracking daily

FAQ

How do I know which CMS feature is breaking UTMs?

Disable features one by one and test after each change. Start with SEO plugins, then caching, then theme features.

Can I use UTMs with any CMS?

Yes. All CMS platforms support query string parameters. You just need to disable features that strip or rewrite them.

What if my CMS uses hash-based routing?

Put UTMs before the hash: site.com?utm_source=x#/page (not after).

Should I switch CMS if mine has UTM issues?

No. Every CMS can work with UTMs correctly once configured properly.

How do I prevent CMS updates from breaking UTMs?

Document your UTM configuration settings and test after each CMS update.

Can CMS plugins improve UTM tracking?

Some analytics plugins help, but standard query strings work best. Don't overcomplicate it.

Conclusion

CMS platforms break UTM tracking through:

  1. URL rewriting (converting query to path)
  2. Plugin/app interference
  3. Theme JavaScript modification
  4. Server-side redirects

Universal fix:

  1. Disable URL optimization features
  2. Use query string format (not path)
  3. Test in GA4 Real-Time
  4. Document configuration

Every CMS can track UTMs perfectly when configured correctly.


Technical Reference: UTM in Path Validation Rule