On this page
What this issue is
Many sites use tools that make mobile pages load faster. These include page caching plugins, CDN features that rewrite scripts, script delay or defer options, and accelerated page formats served from someone else's cache. They work by serving a saved or rewritten copy of your page.
The problem is that tracking depends on things that must be live: scripts that run in the visitor's browser, URL parameters such as gclid and utm_source, and cookies. A saved or rewritten copy can freeze a value, load a tag too late, or drop it altogether. The page looks fine, but the ad and analytics platforms hear nothing, or the wrong thing.
Why it costs you leads or sales
The lead or sale still happens, so the direct damage is small. The cost is in the data. If tags fire late, visitors who leave quickly are never counted. If a cached page loses the ad click ID, the conversion cannot be tied back to the campaign. Ad platforms then learn from less data, and reports undercount your best mobile campaigns.
- Ad clickVisitor lands with gclid and UTMs
- Cached copy servedSpeed layer returns a saved or rewritten page
- Tag loadsScript delayed, blocked or removed
- Page view recordedNever sent
- Conversion attributedNo campaign match
The cached copy delays or drops the tag, so later steps never reach the ad platform.
How to check if your site has it
Open the page the way a visitor would
On a real phone, open your landing page in a private tab with a test URL such as yourpage.com/?utm_source=test&utm_medium=check&gclid=test123. Load it twice so the second view comes from the cache.
Check the tags fire
Use Google Tag Assistant or GA4 DebugView, and the Meta Pixel Helper on desktop with mobile emulation. Confirm the page view and your key events appear.
Check the parameters survive
Look at the address bar and at the tag request. The UTMs and click ID should still be there and should match what you typed, not an earlier visitor's.
Compare cache on and off
Purge the cache or turn off the optimisation features, then repeat. If tags work only with the cache off, the speed layer is the cause.
View the page source
Search the delivered HTML for your tag ID (for example GTM-XXXX or G-XXXX). If scripts show type="rocketlazyloadscript" or similar, an optimiser is delaying them.
How to fix it
The goal is the same everywhere: keep tracking scripts live, and make sure the cache never serves one visitor's parameters or cookies to another. The steps depend on which speed tool you use.
Exclude tracking scripts from delay
In your optimisation plugin (for example WP Rocket's File Optimization, or LiteSpeed Cache's JS settings), add your GTM, GA4 and pixel script URLs to the exclusion list for delayed, deferred or combined JavaScript. Menu names vary by plugin.
Ignore tracking parameters in the cache
Make sure utm_*, gclid, fbclid and similar parameters are not treated as separate cache pages that strip the query string. Most cache plugins have a setting for ignored or cached query strings.
Purge and retest
Clear the page cache and any CDN cache, then repeat the mobile test.
Review speed apps
If you use a speed or script-deferral app, check its settings for delayed third-party scripts and exclude your pixels.
Use Customer events for pixels
Under Settings > Customer events, check that your pixels are connected and not blocked by an app.
Fire on the right trigger
Use Initialization or All Pages triggers for your base tags so they do not wait for a late event.
Test with Preview
Open Preview mode on the cached mobile URL and confirm the container loads and tags fire.
Place scripts in the head
Add tracking code under Project settings > Custom code, in the Head code box, so it loads early. Publish and retest.
Exclude from script rewriting
If a CDN feature rewrites or delays scripts (for example Cloudflare Rocket Loader), turn it off for the tracking scripts or the whole site, and add the data-cfasync="false" attribute to the tag.
Vary the cache correctly
Do not cache responses that contain per-visitor values. Let the browser read parameters from the URL with JavaScript instead of baking them into cached HTML.
<script data-cfasync="false" async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>const params = new URLSearchParams(window.location.search);
const gclid = params.get('gclid');
if (gclid) {
document.cookie = 'gclid=' + encodeURIComponent(gclid) + '; max-age=7776000; path=/; SameSite=Lax';
}Before
- Tracking scripts delayed or removed by the optimiser
- Parameters dropped on the cached copy
- Mobile conversions show as direct or not at all
After
- Tracking scripts excluded from delay and rewriting
- Parameters read live in the browser
- Mobile conversions tied to the right campaign
How to confirm it's fixed
- Second load of the page (from cache) still sends the page view
- Tag Assistant or DebugView shows your key events on a real phone
- UTMs and click ID in the tag request match the test URL
- A test form or purchase appears in the platform with the right source
- Results match with the cache on and with it purged
How to prevent it happening again
Speed settings change often: a plugin update, a new CDN rule or a new optimisation toggle can undo your exclusions. Keep a short list of the scripts that must never be delayed, and retest tracking after any speed or caching change.
- Keep a written list of tracking scripts to exclude from optimisation
- Retest on a real phone after every plugin, theme or CDN change
- Test with a URL that has UTMs and a fake click ID
- Purge caches after changing tag setup
- Compare mobile and desktop conversion counts each month for gaps
How FunnelGuard handles this
FunnelGuard does not check this yet. Detecting a problem that only shows on certain cached or accelerated mobile copies is a possible future check.
What FunnelGuard does today is run your real customer journeys on a schedule, from the EU or the US, and check each step and the tracking hits sent to GA4, Google Ads, Meta and other platforms. If a tag stops firing on a journey it tests, that is visible in the results, but it will not tell you that a mobile-only cache layer is the reason.
Example: mobile and desktop send similar real leads, but the cached mobile pages record far fewer. Numbers are illustrative.
Questions people ask
Why is my tracking not working on mobile but fine on desktop?
A common cause is a speed layer that applies mainly to mobile, such as a cache, script delay or accelerated page copy. It can delay or remove tags and strip URL parameters. Test with the cache purged and with optimisation off to confirm.
Do caching plugins break Google Analytics and Meta Pixel?
They can, if they delay, combine or rewrite the tracking scripts, or serve a cached copy with the wrong parameters. Add your tracking scripts to the plugin's exclusion list and retest on a real phone.
How do I test tracking on a cached page?
Open the page on a phone with a test URL containing UTMs and a fake gclid, load it twice so the second view is cached, then check Tag Assistant or GA4 DebugView. Compare the result with the cache purged.
Why are UTM parameters missing on my cached landing page?
The cache or a redirect may be serving a copy without the query string, or a script reads the value from saved HTML. Make the cache ignore tracking parameters and read them in the browser with JavaScript.
Does Cloudflare Rocket Loader break tracking?
It can delay or reorder scripts, which may make tags fire late or not at all. Turn it off, or add data-cfasync="false" to the tracking script tags, then retest.
Does FunnelGuard detect tracking problems on cached mobile pages?
Not yet. It is a possible future check. FunnelGuard does run your journeys on a schedule and check tracking hits, so a tag that stops firing on a tested journey shows in the results, but it will not name a mobile cache as the cause.
Is this the same as AMP tracking problems?
No. AMP is a specific page format with its own analytics setup. This guide covers cached, rewritten or delayed copies of your normal pages.
Related issues
- TRK-385Tracking breaks on AMP pagesFix guide
- TRK-387Slow tag loading delays LCP/INPFix guide
- TRK-388Too many tags (tag bloat) slowing funnelFix guide
- TRK-384Tracking breaks in in-app browsers (Instagram, TikTok)Fix guide
- TRK-378Tags blocked by ad blockers (no first-party fallback)Fix guide
- TRK-379Safari ITP caps cookies to 7 days / 24 hFix guide