Page MenuHomePhabricator

[BUG] Android: Data Issue - App install IDs missing from app donations
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • We need to to figure out what's going on with some app install ids that are missing from app donations that pop out to the donations form.
  • Christine Stone has been working with Shay Nowick and looked at the banner code here https://donate.wikimedia.org/w/index.php?title=MediaWiki:AppsCampaignConfig.json but it doesn't reference the install id.
  • It looks like iOS ones are passing the data through okay but the Android app ones aren't

What happens?:
Donation data is not being collected

Other information (browser name/version, screenshots, etc.):
Lamar to discuss this with Dmitry and Shay, maybe also Toni for comparison with iOS.

More details to be added here by Dmitry/Shay

SN: Looking at recent App Donation data from Metabase we are seeing the bulk (75% of records from last 40 days) of rows having either NULL or non-usable string values in utm_key where value for donor app_install_id should be. I can't tell if these are duplicate records for other donations or just donations that are getting malformed data. This makes it impossible for us to track unique donors when joining from our internal user data.

See also: https://phabricator.wikimedia.org/T432062

Details

Other Assignee
Dbrant

Event Timeline

ABendall-WMF updated the task description. (Show Details)
ABendall-WMF updated Other Assignee, added: Dbrant.

There are two ways for the user to reach a donation URL from the Android app:

  1. directly from the More menu (More -> Donate), or
  2. from a donation banner, controlled by FR-tech.

In the case of (1), we have a hardcoded URL in the app, which includes the app_install_id parameter. This URL was updated to include the app_install_id parameter as part of T410703.

In the case of (2), the URL in the banner is configured by FR-tech, and we pass that URL straight through without modifying it.
However, it sounds like iOS (unlike Android) is also modifying the banner URL to include the app_install_id. It sounds like the iOS team interpreted the task (T410704) differently from the way the Android team interpreted it: the iOS app appends app_install_id to that URL, while the Android app leaves that URL untouched.

The decision to be made is:

  • Update the Android app to also append app_install_id to banner URLs, or
  • Update the banner URL to have app_install_id in it, with a replaceable $appInstallId variable (similar to the existing $platform variable). This would necessitate an update in both apps. This can even be done as part of T415791.

IMO it is architecturally preferable for FR-tech to retain as much control as possible over the campaign configuration, including the URL, without any implicit modifications made by the apps. Therefore I would advocate for the latter option, with perhaps the first option as a stopgap.


Donation data is not being collected

The data is being collected, just not the app_install_id.


Refer to the slack thread for more context:
https://wikimedia.slack.com/archives/C04LFS8JUDA/p1784138263700469

Hi @Dbrant @LPetty-WMF,

I've been exploring a config update. I updated the Test Wiki config to represent our last campaign (with dates shifted), with the new url proposition:

https://test.wikipedia.org/wiki/MediaWiki:AppsCampaignConfig.json?action=raw

You can test against this config. Note that the campaign URLs look like this:

https://donate.wikimedia.org/?country=JP&uselang=en&appeal=SupportingWikipedia&wmf_medium=WikipediaApp&wmf_campaign=$platform;&wmf_source=$formattedId;&app_install_id=$appInstallId&app_version=$appVersion;

Unfortunately I just tested against our current iOS codebase, and the urls get malformed with this config change. So we will need to bump the config version up to 3 for iOS, then we will update the iOS codebase to remove appending and replace $formattedId, $appInstallId and $appVersion.

Malformed iOS url without version change:

https://donate.wikimedia.org/?country=JP&uselang=en&appeal=SupportingWikipedia&wmf_medium=WikipediaApp&wmf_campaign=iOS&wmf_source=$formattedId;&app_install_id=$appInstallId&app_version=$appVersion;&app_version=8.2.2

Malformed iOS url without version change:

https://donate.wikimedia.org/?country=JP&uselang=en&appeal=SupportingWikipedia&wmf_medium=WikipediaApp&wmf_campaign=iOS&wmf_source=$formattedId;&app_install_id=$appInstallId&app_version=$appVersion;&app_version=8.2.2

(To be pedantic 😅) it's technically not malformed; it's still a legal URL, and should be consumable by donatewiki; it's just that the $ variables are not replaced by an app client that doesn't know to replace them. Nevertheless I do agree that if we're adding a bunch of new replaceable variables, we should bump the version number of the structure to 3 and proceed from there.

This needs estimation before pulling in

After syncing with @Tsevener, I updated T415791 to include all the new replaceable variables we want to add.
And we probably don't need to do the "stopgap" option on Android, mentioned above, and instead just do T415791 all at once.

Fix has been validated in Metabase data - all non-recurring Banner donations are showing value for app_install_id Android and iOS.