Page MenuHomePhabricator

Add iOS to WikipediaApp value in useragent for all in app events
Closed, ResolvedPublic

Description

When looking at edits in mediawiki_history I found a number of edits made using the iOS app that were not tagged as ios app edit in column revision_tags- after researching these edits by revision_id I found that they were all made by users with iPadOS Tablet values in their useragent data. It looks like the Mobile app extension that adds the ios app edit tag is not set up to assign iPadOS edits to ios app editcategory. This issue

After discussion it was proposed that instead of changing the Mobile app extension to recognize iPadOS we could instead append iOS to the WikipediaApp/version value that is sent with useragent data.

Also noting here that the value for os_family in useragent is still (and has been) assigned to iOS even for events originating from iPadOS so we can see them in our internal data. However that filter is applied it is able to recognize iOS devices both Phone and Tablet.

Engineering Notes

Android hardcodes "Android" into their user agent name, so we should do the same. We should swap out systemName with a hardcoded iOS to fix any backend logic targeting the string "iOS". We already have "Phone" and "Tablet" at the end so that will provide us extra context about iPhone vs iPad.

Event Timeline

This task is a back-up (extra assurance) in addition to Dmitry's patch

Tsevener raised the priority of this task from Low to Needs Triage.Jun 11 2024, 5:17 PM
Tsevener updated the task description. (Show Details)

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly pointed to the codebase URL and provide clear steps to help a contributor get setup for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3

Hello! Is it possible to assign me for this task?

Nemoralis subscribed.

Hello! Is it possible to assign me for this task?

Hello. I assigned you to this task. Read this for future: https://www.mediawiki.org/wiki/Phabricator/Help#Assigning_yourself_a_task

Opened up a pull request on this topic: https://github.com/wikimedia/wikipedia-ios/pull/4870 . This is my very first PR, not sure if I am doing things right, I am sorry. Btw, should I change tags for the topic and/or move it to the release board? Where can I find some guidelines on this? Thank you

Hi @Alevtina_Mashtaler, thank you for the PR! I moved your ticket to the correct column on our release board. For future reference, our contributing document in the repository has been updated with the latest information. Let us know if you have any other questions, thanks!

@SNowick_WMF Fixes will be in TestFlight 7.5.3 (3670). Can you validate that the data still looks okay?

Hi @Tsevener verifying for new app version data we are no longer seeing iPadOS as a value in http.request_header

Platform Event:New value:Old Value:
iPad event{'user-agent': 'WikipediaApp/7.5.3.3670 (iOS 18.0; Tablet)'}{'user-agent': 'WikipediaApp/7.5.2.3622 (iPadOS 18.0; Tablet)'}
iPhone event{'user-agent': 'WikipediaApp/7.5.4.132 (iOS 17.6; Phone)'}{'user-agent': 'WikipediaApp/7.5.2.3622 (iOS 17.6; Phone)'} (no change)

I was also able to validate that edits which have the new app version user-agent data were tagged as ios app edit in revision.

Ok to close ticket on my end - thanks!

HNordeenWMF claimed this task.