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

Pass along UTMs when doing a blog redirect #13381

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

caldav
Copy link
Contributor

@caldav caldav commented Nov 29, 2023

Done

  • Updated the blog redirection logic to append URL params.

QA

@webteam-app
Copy link

Demo starting at https://ubuntu-com-13381.demos.haus

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #13381 (c590280) into main (2c11e4b) will not change coverage.
Report is 14 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13381   +/-   ##
=======================================
  Coverage   74.41%   74.41%           
=======================================
  Files         107      107           
  Lines        2838     2838           
  Branches      946      946           
=======================================
  Hits         2112     2112           
  Misses        702      702           
  Partials       24       24           

@caldav
Copy link
Contributor Author

caldav commented Nov 29, 2023

Somehow, this doesn't work in the demo, but it works locally...

Copy link
Contributor

@lorumic lorumic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that it works locally for me as well. Not sure why it fails on the demo server though. Let's maybe wait for a second reviewer from sites, who might know which could be the reason.

webapp/views.py Outdated
@@ -736,10 +736,17 @@ def dispatch_request(self, slug):
if "article" not in context:
return flask.abort(404)

# Redirect canonical annoucements
# Capture the original query string
original_query_string = flask.request.query_string.decode("utf-8")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this variable is used only inside the if block below, can you declare it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akbarkz done, good catch, thank you

@akbarkz akbarkz merged commit 143e5ea into canonical:main Dec 6, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants