Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFlare is stripping UTM tags again #7329

Closed
TheoChevalier opened this issue Sep 7, 2021 · 7 comments
Closed

CloudFlare is stripping UTM tags again #7329

TheoChevalier opened this issue Sep 7, 2021 · 7 comments
Assignees

Comments

@TheoChevalier
Copy link
Contributor

Looks like what we had in place is not working anymore, UTM tags are stipped on prod during redirects (works on staging)

Test URL https://foundation.mozilla.org/campaigns/apples-anti-tracking-plans-iphone/?subscribed=1&utm_source=email&utm_medium=email&utm_campaign=2020advocacy-fr&utm_content=appleidfathanks&utm_term=5382510

@tomusher Could you check the custom code you wrote for the worker is still in place?

@benhohner
Copy link
Contributor

@TheoChevalier Upon further investigation looks like a localization regression that only works with links without the locale. #7329 @tomusher has checked and it's not Cloudflare this time

@benhohner benhohner reopened this Sep 7, 2021
@benhohner benhohner changed the title CloudFlare is stripping UTM tags again Wagtail Regression that's stripping UTM tags Sep 7, 2021
@benhohner benhohner changed the title Wagtail Regression that's stripping UTM tags Fo'mo Regression stripping UTM tags Sep 7, 2021
@benhohner
Copy link
Contributor

@Pomax true! Reverting. @tomusher can you take a look at this again?

@benhohner benhohner changed the title Fo'mo Regression stripping UTM tags CloudFlare is stripping UTM tags again Sep 7, 2021
@benhohner
Copy link
Contributor

@tomusher @TheoChevalier Update: seems to only happen if you're logged in to Wagtail. Otherwise, it works properly

@TheoChevalier
Copy link
Contributor Author

Oooh nice! Thanks for figuring this out!

@tomusher
Copy link
Contributor

Good catch thank you @benhohner - turns out this was the worker.

It was configured to strip querystrings from every request, check if the request was cacheable (i.e. user isn't logged in), and then only reapplies the stripped values if the request was cacheable.

I've moved the querystring stripping logic so it only happens after we've determined whether the request is cacheable which seems to have resolved this.

@TheoChevalier
Copy link
Contributor Author

Confirming this is fixed, thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants