Cloudflare Automatic Platform Optimizations (APO) strips UTM tag from URL

,

Actually, turns out it was an SEO plugin (All-in-one SEO), which was stripping all parameters from the URL.

Edit: Actually, looks like it was a combination of things, but the main one was a Redis Object Cache plugin on Cloudways.

Once I disabled this, all other plugins were fine to keep enabled.

P.S. as with anything, maybe there are other factors. Will update if anything changes.

Hello everyone,

Thanks for your patience on this. The last month has been pretty busy on our side, so I didn’t have much time to look into it until recently.

Yesterday, I think I identified the root cause of the issue. The possible fix is currently being rolled out, and should be deployed everywhere in a few hours. My initial tests against my own zone on already fixed servers are showing that utm* parameters and other allowlisted query parameters are no longer removed.

If you see my message after 2023-04-12T17:00:00Z, you should expect the fix to have been deployed everywhere and could test your zone with APO enabled again and without the Rewrite URL Transform Rule.

Let me know if you still experience issues, I’ll continue to look into it on a case-by-case basis.

2 Likes

I am sorry, I was out sick and just have gotten out of my backlog.

Fortunately we do have the update now!

1 Like

Great news, thank you for taking the time!
I have activated APO and after clearing caches and everything, close monitoring seems the issue is solved. utm parameters are not lost.

One thing though , maybe you can clarify… when on the browser I see a 301

But on a curl, it shows a 520?

This is unrelated to this topic, because if a domain for some reason is returning a 520 you’ll get the same error if you curl with or without the UTM parameter. I’ve tested repeatedly with an APO test domain and I’m getting the expected 301/200 responses.

Please feel free to check the documentation on the 520 error and if you think there’s any reason this is Cloudflare-related, open a separate topic.

1 Like

Yep, Just checked. That issue is there no more. Now UTM tags are staying there after the redirection.

Thank you.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.