This is expected behaviour. Marketing tags such as these are used by JavaScript running on your site, and do not need to be preserved through the cache. Cloudflare will ignore certain query parameters when checking for cached objects.
What is the use case where you need UTM parameters to bypass the cache?
Ideally, it should always preserve the UTM parameters. At least for the first-page visit (so that our analytics can detect UTM, and pull that source info through)
Hey!
Yes, issue is that your domain redirects from https://fundtap.co/ to FundTap | The Invoice Finance Specialists in my case…
Unfortunately it is know that with redirection APO removes the utms … this is an issue that I haven’t seen solved recently and there are more posts asking for help on this matter
My Cloudflare ticket ID regarding this issue is #2718110.
When clicking a Google Ad linking to my site, the URL search parameters (?gclid=####) are being removed by an immediate re-direct, caused by the Cloudflare Wordpress plugin. Specifically, disabling the “Automatic Platform Optimization” fixes this issue, but as this is a paid feature I’d prefer to be able to continue using it.
This issue seemed to have been fixed a couple weeks ago, by an apparent update on Cloudflare’s side (though they never made any announcement or news post), however the issue seems to have started again sometime since then. Once again, disabling APO is the only solution currently.
I had a previous Cloudflare Community thread regarding this, and allowed it to be closed when my issue seemed to have been fixed:
I can provide my website’s URL and re-enable APO if testing is needed, however at the moment I have it disabled so that it does not interfere with our Google Ads tracking.
I have also opened a ticket with Cloudflare’s email support 17 days ago, and never received any actual support, only a response (after 13 days) saying they can’t help since the issue (at that time) seemed to be fixed.
The ticket ID is #2718110, if it can be escalated that would be appreciated.
There are similar cases reported by other users and Cloudflare staff is already looking into it. You should hear about any evolution either here or via email.
Meanwhile, if you want to re-enable APO, you could try (I can’t promise this will work, as APO is a magic of its own) to create a Transform Rule:
(http.request.uri.query contains "gclid" and not ends_with(http.request.uri.path, "/"))
Problem is on the 26 of February something changed on APO, and now almost everything with utms just ends up losing it…
I have a big chunk of traffic from facebook, so what I did notice was that on that day my traffic with utms just fell, and the facebook traffic converted o traffic from lm.facebook.com / referral
On the 27th I thought it was an issue with Facebook Link Checker, but no one I knew had same issue so on the 28th I tried disabling APO and pufff… issue gone, on GA real time the lm.facebook.com traffic just started instantly falling and traffic with utms rise…
So now I can’t activate APO, was there a change made on the 27th to APO technology that could explain this? Nothing on my websites changed… and other ones that I have with CF but without APO active just didn’t have this issue…
I have seen a similar post here but the reason there is about redirection
Although I believe that working correctly , the redirection should lose the utms?
@yevgen any input maybe? Or what could I do to debug this further?
Hey everyone and thanks @matteo for merging the topics,
I’ll try to look that issue. Cannot promise anything but I’ll give it a serious try. Those issues have been opened for too long already and we can see how it can be a common issue for many users.
I’ve set up a dummy Wordpress website behind Cloudflare with APO enabled and wasn’t able to reproduce.
I don’t think there is no issue, but that my configuration is probably not quite the same as yours yet @wu1@casey9@mejorainfotech, so I would need more informations regarding your own setup.
While I’m waiting for your own configuration, I’ll ask internally if anyone else may have any guess.
Finally, when I try to access aseure.uk, which is redirected by Wordpress (as far as I understand) to www.aseure.uk, with the exact same UTM parameters, I get redirected via a 301 from aseure.uk to www.aseure.uk, and the parameters are correctly there:
I’ve re-enabled APO & cleared all caches so that the issue is repeatable on my site. Following the link below results in the URL params being removed: https://example.com/landing-page?gclid=EAIaIQobChMI7LyL5Zi5_QIVLv3jBx35NQZ6EAAYASAAEgL6jvD_BwE&cftest=true
However if you add a / before the “?gclid” the redirect does not happen, and the URL is unmodified: https://example.com/landing-page/?gclid=EAIaIQobChMI7LyL5Zi5_QIVLv3jBx35NQZ6EAAYASAAEgL6jvD_BwE&cftest=true
My config
I have APO enabled, “Cache by Device Type” is NOT checked:
This is such a specific case, which requires multiple separate specific cases…
Let’s see if I can share a case @aseure_cf can reproduce himself without sharing any of my private domains.
You need a path, no end /, analytics query parameters and no custom query params.
For brevity I will use just one of the utm_* params, one is enough to reproduce the issue.
The reason it was working in my DevTools is because of the Disable Cache checkbox being checked. This was injecting a Cache-Control: No-Cache header which hid the issue. Without the header, I’m able to reproduce.
What I noticed, is that it only loses utms when I use “?utm_source”, if I use something like “?index” it doesn’t lose the utm… behaving as I “expected”
So, when accessing https://onlinetips.com/?index=1231 it redirects to https://www.onlinetips.com/?index=1231 and keeps query parameters.
If acessing https://onlinetips.com/?utm_source=1231 it will go to https://www.onlinetips.com losing query parameters.