Page MenuHomePhabricator

Rename utm_ URL parameters through donatewiki and paymentswiki
Closed, ResolvedPublic

Description

Our data about which campaigns and emails prompt which donations is getting less accurate as browsers and privacy extensions strip off URL parameters that are used by third-party tracking libraries, such as utm_campaign, fbclid, etc.

Lucky for us, we don't use any third-party tracking libraries, so we can just use different parameters on the URLs.

I propose just replacing 'utm' with 'wmf' in each parameter's name, so: wmf_campaign, wmf_source, wmf_key, wmf_medium.

We would continue to accept the old utm_ parameters at DonationInterface for a long transition period, and probably keep utm_ in the internal names to minimize schema changes and code changes.

Event Timeline

@Ejegg just making a note that we should report out on any QA we do to ascertain whether or not this works - i.e. do privacy-protecting browsers etc ignore these wmf tags or treat them differently to UTM tags.

@AKanji-WMF I would be very surprised to see them stripping parameters outside of a very small list of known tracking params, since that would break a lot of web sites.

Adding here my quick notes on things that we would want/need to change:

  • banner core js
  • donatewiki form js
  • the endowment switch (on donate, and payments)
  • passing from DonationInterface to TY page
  • storing in Fundraise Up for export
  • passing from Fundraise Up to TY page
  • js code on TY page, and fields passed to surveymonkey
  • app banners
  • portal banners
  • wikimediafoundation.org
  • sidebar
  • probably other stuff I'm not thinking of

Presuming fields stay the same in the database, so analytics scripts would be okay

Bringing this back to triage so we can discuss next steps and make subtasks if necessary.

@Pcoombe let's meet to discuss next steps to implementing this in the next couple of weeks.

@AKanji-WMF I'm out of office next week, but feel free to put something on my calendar for when I'm back

@Pcoombe brought up in a meeting that we need to update the parameters we pass through to the Thank You pages. To avoid really long URLs, he suggests we do a hard cutover in the payments-wiki code. This means he will need to update the TY page javascript to accept both prefixes for a while.

Change #1015351 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Use wmf_ params for redirect to TY pages (DEPLOY NOTE)

https://gerrit.wikimedia.org/r/1015351

@Ejegg I've updated the Thank You page to cope with either wmf_ or utm_ prefixes (and convert to utm_ for the survey links until we can get that fixed). So fine to push that patch out whenever you're ready.

Change #1015351 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Use wmf_ params for redirect to TY pages (DEPLOY NOTE)

https://gerrit.wikimedia.org/r/1015351

@Ejegg There is some special-casing on payments forms which changes the logo and some of the link targets when utm_medium=endowment. Can you make that work with wmf_medium=endowment too?

Change #1025779 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Update endowment hook to respect wmf_medium

https://gerrit.wikimedia.org/r/1025779

Change #1025779 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Update endowment hook to respect wmf_medium

https://gerrit.wikimedia.org/r/1025779

@Ejegg There is some special-casing on payments forms which changes the logo and some of the link targets when utm_medium=endowment. Can you make that work with wmf_medium=endowment too?

Good catch @Pcoombe! On my local wiki I saw the right footer links with the wmf_ parameter - it was just the logo that was wrong. I just deployed a fix for the logo. Do you want to check again? You may need to clear cookies or use incognito as we store endowment-or-not in session.

Cool, logo and links look good to me now. Thanks @Ejegg !

Banner code is updated, made some test donations and they look good!

Next step is donatewiki which will be more complicated, but I'm hoping to get it done this week taking advantage of the maintenance window.

Change #1035806 had a related patch set uploaded (by Pcoombe; author: Pcoombe):

[mediawiki/extensions/FundraiserLandingPage@master] Updating from utm_ to wmf_ parameters

https://gerrit.wikimedia.org/r/1035806

I've updated the donatewiki on-wiki javascript to accept either utm_ or wmf_ style parameters, and always pass them as wmf_ to payments

The patch above updates FundraiserRedirector to convert utm_ to wmf_ style parameters, and also fixes pageview logging

Change #1035806 merged by jenkins-bot:

[mediawiki/extensions/FundraiserLandingPage@master] Updating from utm_ to wmf_ parameters

https://gerrit.wikimedia.org/r/1035806

Change #1037149 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[operations/puppet@production] httpbb-tests: Update https://donate.wikimedia.org redirect Location

https://gerrit.wikimedia.org/r/1037149

Change #1037149 merged by RLazarus:

[operations/puppet@production] httpbb-tests: Update a donate.wikimedia.org expected redirect

https://gerrit.wikimedia.org/r/1037149

Pcoombe claimed this task.
Pcoombe updated the task description. (Show Details)

Closing this, the main work is done and I sent an email to fr-all explaining the changes. I made a few subtasks for getting links that Fundraising doesn't control directly updated