On this page
What this issue is
A page cache stores a ready-made copy of a page so the server does not have to build it again for each visitor. To find the right copy, the cache uses a cache key. By default the key is usually the full URL, including everything after the ?.
Paid ads add parameters to your links: utm_source, utm_campaign, gclid (Google Ads), fbclid (Meta), msclkid (Bing), ttclid (TikTok) and others. Click IDs are unique per click. So /landing?gclid=abc and /landing?gclid=xyz are two different keys, and neither has a stored copy. Each ad visitor triggers a full page build on the origin. Your cache works for organic visitors on the clean URL and does almost nothing for paid traffic.
Why it costs you leads or sales
Ad visitors are the traffic you pay for. If they get the slowest version of your page, you pay for clicks that leave before the page loads. The origin also does extra work during a campaign launch, exactly when many people arrive at once. That can push response times up for everyone and, under heavy load, cause errors.
The problem is easy to miss. You test the clean URL, it is fast, and the cache looks healthy. Only the tagged URL is slow.
- Ad clickURL ends in ?gclid=unique-id
- Cache lookupKey includes the gclid, so no copy is found
- Origin builds pagePHP and database work on every visit
- Slow first byteVisitor waits, some leave
The unique gclid makes the URL a cache miss, so the origin builds the page every time.
Example: illustrative numbers for a site where the cache ignores nothing. Your own values will differ.
How to check if your site has it
Request the same page with and without a tracking parameter and compare the cache headers and the time to first byte (TTFB, the wait before the first data arrives). Use a made-up value each time so you are not hitting a copy stored earlier.
# Run each twice: the first request may fill the cache, the second shows the real result
for url in "https://example.com/landing/" "https://example.com/landing/?gclid=test$RANDOM"; do
echo "== $url"
curl -s -o /dev/null -D - -w 'TTFB: %{time_starttransfer}s\n' "$url" | grep -iE 'cache|age:|x-cache|cf-cache-status|x-varnish|TTFB'
done| Header | Clean URL | Tagged URL (problem) |
|---|---|---|
| cf-cache-status (Cloudflare) | HIT | MISS or DYNAMIC |
| x-cache (CloudFront, Fastly, others) | Hit | Miss |
| age | A number above 0 | Missing or 0 |
| x-varnish | Two IDs | One ID |
| TTFB | Low | Much higher |
How to fix it
The goal is to ignore tracking parameters in the cache key, not to remove them from the URL. The browser still sees ?gclid=..., so your analytics and ad tags can read it. Only the cache lookup treats the URL as the clean page. Do this only for parameters that do not change page content. Never ignore parameters like ?product=12 or ?page=2.
List your tracking parameters
Typical ones: utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, gbraid, wbraid, fbclid, msclkid, ttclid, li_fat_id. Add any custom ones your ad links use.
Find where your page cache lives
It may be a WordPress plugin, your host's built-in cache, a CDN such as Cloudflare, or a server layer such as Nginx or Varnish. Fix it at the layer that does the lookup. Several layers can each need the setting.
Set that layer to ignore the parameters
Use the platform tabs below for common setups.
Keep dynamic parameters out of the ignore list
Only list parameters that never change what the page shows.
Purge the cache and retest
Clear the cache after the change, then repeat the curl comparison.
Check your cache plugin's query string setting
Many cache plugins (for example WP Rocket, LiteSpeed Cache, W3 Total Cache) have a list of query strings to ignore or exclude from bypass. Add your tracking parameters there. WP Rocket ignores common ones such as utm_ and gclid by default in recent versions, but confirm in its settings and add custom ones. Menu names differ by plugin and version.
Check the host cache too
Managed WordPress hosts often run their own server cache. Check the host's dashboard or support docs for a way to ignore query parameters.
Test first
Shopify manages page caching and you cannot edit the cache key. Run the curl comparison. If the tagged URL is much slower, focus on reducing theme and app work, since the cache rules are not yours to change.
Not a cause
GTM does not control server caching. It only reads the parameters in the browser. Fix the cache layer instead, and keep the parameters in the URL so GTM and your ad tags can read them.
Test first
Webflow hosting uses its own CDN and gives you no setting for the cache key. Run the curl comparison. If you put Cloudflare or another CDN in front, set the query string rule there.
Test first
Wix manages caching and offers no cache key setting. Compare the two URLs. If the gap is large, contact Wix support with your test results.
Test first
Squarespace controls caching on its platform and exposes no cache key setting. Compare the two URLs and raise a support ticket if the tagged one is much slower.
Test first
GoHighLevel hosts funnel pages on its own infrastructure and has no cache key setting that we can point to. Compare the two URLs. If you front the domain with a CDN, set the rule there.
Cloudflare
Go to Caching > Cache Rules. Create a rule for your pages with Cache eligibility set to eligible, then under Cache key set Query string to Exclude and list the tracking parameters. Cache keys are applied at the edge, so purge afterwards.
Nginx
Build the cache key without the query string, or with only the parameters that matter. See the snippet below.
Varnish
Strip tracking parameters in vcl_recv before the lookup. See the snippet below.
# Use only for pages whose content does not depend on any query parameter
proxy_cache_key "$scheme$host$uri";sub vcl_recv {
if (req.url ~ "(\?|&)(utm_[a-z]+|gclid|gbraid|wbraid|fbclid|msclkid|ttclid)=") {
set req.url = regsuball(req.url, "(utm_[a-z]+|gclid|gbraid|wbraid|fbclid|msclkid|ttclid)=[^&]*&?", "");
set req.url = regsub(req.url, "[?&]+$", "");
}
}Before
- Each gclid or fbclid creates a new cache key
- Ad visitors always reach the origin
- Slow first byte on paid traffic
- Origin load climbs during campaigns
After
- Tracking parameters ignored in the cache key
- Ad visitors get the cached copy
- First byte close to the clean URL
- Parameters still in the URL for analytics
How to confirm it's fixed
- Purge the cache after changing the rule
- Request the tagged URL twice with a fresh gclid value; the second response should show a cache hit or an age header
- TTFB for the tagged URL is close to the clean URL
- Open the tagged URL in a browser; the parameter is still in the address bar
- In your analytics real-time view, the visit still shows the campaign source and the click ID is still captured
- A URL with a content-changing parameter (such as ?page=2) still shows the right content
How to prevent it happening again
New ad platforms bring new click ID parameters, so the ignore list goes out of date. Review it whenever you start advertising on a new network. Also recheck after you switch host, CDN or cache plugin, because the setting often does not carry over.
- Add the cache comparison to your campaign launch checklist
- Keep a written list of the tracking parameters your ads use
- Retest after changing hosting, CDN rules or cache plugins
- Use the tagged URL, not just the clean one, when you run speed tests
- Keep dynamic parameters (search, filters, pagination) out of the ignore list
How FunnelGuard handles this
FunnelGuard does not check this yet. Comparing response time with and without tracking parameters is a possible future check, but today it is not part of the service.
What FunnelGuard does do is run your real customer journeys on a schedule, from the EU or the US, with test traffic marked with utm_source=funnelguard and fg_test=1. It checks each step of the journey, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. A failure is re-checked from a second region before one alert is sent with a screenshot and a likely cause. That tells you if a journey breaks, but it does not tell you that ad traffic is missing the cache.
To watch for this issue yourself, rerun the curl comparison above after every cache, CDN or hosting change and before each campaign launch. You can also use any speed testing tool that lets you enter a full URL with parameters, and compare it to the clean URL. The Free plan (1 site, 2 journeys, daily checks, no card) and a free read-only website audit are available if you want help watching the funnel itself.
Questions people ask
Why is my landing page slow only when visitors come from ads?
Ad links add parameters such as gclid or fbclid, and many caches treat each unique URL as a separate page. The ad visitor misses the cache and the server builds the page from scratch. Compare the TTFB of the clean URL and a tagged URL to confirm.
Do UTM parameters break caching?
They can. If the cache key includes the full URL, every different UTM combination is a separate entry, so it may need to be built once per combination. Because gclid and fbclid are unique per click, those almost always miss. Configure the cache to ignore tracking parameters.
How do I make my cache ignore gclid and utm parameters?
Add the parameters to the ignore or exclude list in your cache layer. In Cloudflare, use a Cache Rule and set the query string option to exclude them. In a WordPress cache plugin, look for its ignored query strings setting. In Nginx, build the cache key from $uri only.
Will ignoring query parameters in the cache stop Google Ads tracking?
No, as long as the parameters stay in the browser URL. The cache ignores them only when choosing the stored copy, and your tags still read them in the page. Avoid redirects that strip the parameters, as they can lose the click ID.
How can I test if a URL with gclid is cached?
Run curl with a made-up gclid value twice and look at the cache headers, such as cf-cache-status, x-cache or age. A second request showing HIT or an age above 0 means it is cached. Also compare TTFB with the clean URL.
Is it safe to ignore all query parameters in the cache?
No. Parameters like search terms, filters, page numbers or product IDs change what the page shows. Ignore only the tracking parameters that never change content, or visitors may see the wrong page.
Does FunnelGuard detect cache misses from tracking parameters?
No. FunnelGuard does not check this yet, though it is a possible future check. It does run your funnel journeys and tracking checks on a schedule. For cache behaviour, compare tagged and clean URLs manually.
Related issues
- PRF-050TTFB over 800 msFix guide
- PRF-053Full-page cache disabled or bypassed (WordPress cache plugin off)Fix guide
- PRF-055HTML served with Cache-Control: no-store on static pagesFix guide
- PRF-060CDN serving stale page after deploy (old prices/offer)Fix guide
- PRF-067Redirect chain adds 1+ s before first byteFix guide
- PRF-052Slow TTFB only from one region (no CDN)Fix guide