Page MenuHomePhabricator

[Bug] Multiple appInstallID generated by different funnels
Closed, ResolvedPublic

Description

I did a test on a subset of the data and found that all the appInstallID in MobileWikiAppDailyStats are not in webrequest, and all the appInstallID in webrequest are not in MobileWikiAppDailyStats (See https://phabricator.wikimedia.org/P6819 for the queries. Confirmed in one example: P6819#38753 ).

Later, we discover that the reason for this issue is we generate different appInstallID for different funnels. Specifically, WMFDailyStatsLoggingFunnel, ReadingActionFunnel and WMFShareFunnel (not sure if there are other funnels) generate different appInstallID. Among them, WMFShareFunnel and WMFDailyStatsLoggingFunnel only send the ID to their corresponding event logging schemas, while ReadingActionFunnel send ID to BOTH event logging schema AND X-Analytics header along with api calls to retrieve feed, articles, etc.

Steps to reproduce

  1. Set a breakpoint here https://github.com/wikimedia/wikipedia-ios/blob/e444abd854fc79af9caf2440439c40d70b65cb75/Wikipedia/Code/EventLogger.m#L39
  2. Clean install, opt in to send reports during onboarding :D

Simulator Screen Shot - iPhone X - 2018-05-03 at 12.11.50.png (1,125×2,436 px, 179 KB)

  1. When breakpoint is triggered for the first time, po event and note the ID (that's the one generated by WMFDailyStatsLoggingFunnel)
  2. Continue execution
  3. Save one of the articles in the feed
  4. When breakpoint is triggered, po event and note the ID (that's the one generated by ReadingActionFunnel)
  5. Continue execution
  6. Open that article and tap share on the article toolbar
  7. When breakpoint is triggered, po event and note the ID (that's a different ID generated by WMFShareFunnel)

It looks like WMFSuggestedPagesFunnel, WMFSearchFunnel and WMFHamburgerMenuFunnelgenerate aren't even used anywhere so it's safe to disregard those.

Expected Results

We want to use the same appInstallID across all schemas and X-Analytics header. This ID should be the same after user update the app. BUT delete/reinstall or opt-out/in should delete the ID, and create a new one.

See also T189359: [Bug] WMFDailyStatsLoggingFunnel doesn't send event on the day users opt-in from setting

Event Timeline

JMinor moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App board.
chelsyx renamed this task from [Bug] appInstallID is different in webrequest and eventlogging, and not persistent over time to [Bug] appInstallID is different in webrequest and eventlogging.Apr 18 2018, 8:22 PM
chelsyx updated the task description. (Show Details)
chelsyx renamed this task from [Bug] appInstallID is different in webrequest and eventlogging to [Bug] appInstallID is different in webrequest and MobileWikiAppDailyStats.Apr 18 2018, 8:28 PM
chelsyx updated the task description. (Show Details)
chelsyx renamed this task from [Bug] appInstallID is different in webrequest and MobileWikiAppDailyStats to [Bug] appInstallID is different in MobileWikiAppDailyStats vs webrequest (and other event logging funnels).Apr 18 2018, 8:31 PM
chelsyx renamed this task from [Bug] appInstallID is different in MobileWikiAppDailyStats vs webrequest (and other event logging funnels) to [Bug] Multiple appInstallID generated by different funnels.May 4 2018, 11:06 PM
chelsyx updated the task description. (Show Details)
JMinor added a subscriber: NHarateh_WMF.

Leaving open until @chelsyx can verify production data is looking correct after release.

chelsyx claimed this task.