Page MenuHomePhabricator

Standardize utm_source from app donations without a banner and clean up old data
Closed, ResolvedPublic

Description

We are creating utm_source for in app donations but for others starting in the app and going into a web browser the utm_source is set to the app version. Example:

utm_medium=WikipedaApp
utm_campaign=iOS
utm_source=7.4.3.2822

Our code is exploding utm_source on . so this is putting 7 or 2 into the banner data.

  • Update the apps to send appmenu in utm_source and not the app version
  • Do send the app version in app_version
  • Add catch in DonationData to set utm_source to appmenu.app.$paymentmethod
  • Clean up current data

Event Timeline

Change 973237 had a related patch set uploaded (by Cstone; author: Cstone):

[mediawiki/extensions/DonationInterface@master] Add catch to change utm_source from non banner app donations

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

AKanji-WMF subscribed.

Moving into current sprint to review @Cstone patch; then pending Apps team

More notes for apps:

This ticket is for modifying the values we send when the user goes to donate via our web view through the app Settings path (i.e. not campaign modal, not native Apple Pay). Currently through Settings, iOS sends users to this in-app web view url:

https://donate.wikimedia.org/?utm_medium=WikipediaApp&utm_campaign=iOS&utm_source={app-version}&uselang={langcode}

We want to modify it to send them to:

https://donate.wikimedia.org/?utm_medium=WikipediaApp&utm_campaign={iOS/Android}&utm_source=appmenu&uselang={langcode}&app_version={app_version}

Given we aren't going to manage to make this change, test etc. prior to big english, to avoid any complications in data this work should not be released in production until after big english

Change 973237 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Add catch to change utm_source from non banner app donations

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

Change 974708 had a related patch set uploaded (by Cstone; author: Cstone):

[mediawiki/extensions/DonationInterface@master] Add catch for in app donation with no banner

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

Change 974708 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Add catch for in app donation with no banner

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

Change 975082 had a related patch set uploaded (by Cstone; author: Cstone):

[mediawiki/extensions/DonationInterface@master] Change from app to inapp to distinguish donation source

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

Change 975082 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Change from app to inapp to distinguish donation source

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

Talked to @JMando today, the utm_source from in-app donations will change to appmenu.inapp.apple while the ones from the app but done through the browser will stay as appmenu.app.{payment_method}

Moved this on the wrong board. Attempting to fix it now.

Change 991441 had a related patch set uploaded (by Cstone; author: Cstone):

[mediawiki/extensions/DonationInterface@master] Set utm_source middle part (landing page) to app when coming from the app

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

Change 991441 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Set utm_source middle part (landing page) to app when coming from the app

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

Hi @Cstone! I plan on picking this one up soon to clean up what the app is sending. Here's what I've documented from testing around on the upcoming JP campaign:

Native Apple Pay, going through JP campaign modal

POST URL: https://payments.wikimedia.org/api.php
Params:
"donor_country": "United States"
"first_name": "Fake"
"postal_code": "{#}"
"app_version": "7.5.0.0"
"last_name": "Test"
"amount": "300"
"banner": "app_2024_JP_iOS_control"
"language": "ja"
"payment_network": "AmEx"
"recurring": "0"
"full_name": "Test Fake"
"street_address": "123 Fake Street"
"state_province": "TX"
"pay_the_fee": "0"
"payment_token": "{token}"
"city": "Faketown"
"payment_method": "applepay"
"currency": "JPY"
"format": "json"
"action": "submitPayment"
"country": "JP"
"email": "fakeperson@gmail.com"

Native Apple Pay, going through Settings

POST URL: https://payments.wikimedia.org/api.php
Params:
"recurring": "0"
"language": "ja"
"state_province": "TX"
"donor_country": "United States"
"first_name": "Fake"
"country": "JP"
"payment_token": "{token}"
"email": "fakeperson@gmail.com"
"action": "submitPayment"
"last_name": "Test"
"currency": "JPY"
"full_name": "Test Fake"
"postal_code": "{#}"
"street_address": "123 Fake Street"
"payment_method": "applepay"
"city": "Faketown"
"pay_the_fee": "0"
"payment_network": "AmEx"
"app_version": "7.5.0.0"
"format": "json"
"amount": "300"

In-app web view, going through campaign modal

Loads https://donate.wikimedia.org/?uselang=ja&appeal=JimmyQuote&utm_medium=WikipediaApp&utm_campaign=iOS&utm_source=app_2024_JP_iOS_control

In-app web view, going through Settings

Loads https://donate.wikimedia.org/?utm_medium=WikipediaApp&utm_campaign=iOS&utm_source=7.5.0.0&uselang=ja

Changes needed:
So for the two web urls, we need to add &app_version={appversion}. And for the Settings web url, change utm_source value from {appversion} to appmenu. Just want to make sure I have that right and your comment in https://phabricator.wikimedia.org/T350919#9339637 doesn't apply to the app.

Just to confirm what we talked about on slack:
Yes we want to add app_version as a new parameter and move the version out of utm_source, replacing it with appmenu for the settings url

We also talked about banner vs utm_source

In our database we are breaking up utm_source into banner, landing page, and payment_method. Our form still is looking for a utm_source parameter so any web urls should still use that. For the native flows the pieces can be broken up into banner and payment_method

@Cstone

Upcoming changes are: For donate web urls, when coming through settings we will change the utm_source value to appmenu, and add the app version to a new app_version query item. When coming through a campaign modal, we are adding a new app_version query item to the web donate url.

Our plan is to release this change by the end of next week. We will go out to external beta testers at the end of this week.

The submitPayment API post from the Apple Pay native form will be unchanged. Please let us know if you see any issues as we roll out. Thanks!