Page MenuHomePhabricator

Homepage: do not log HomepageVisit when handling tutorial visit POST requests
Closed, ResolvedPublic

Description

Currently a HomepageVisit event is logged for users who click on the tutorial button, because although we redirect the user to the tutorial title, we don't break the flow of SpecialHomepage.php and therefore a HomepageVisit event is logged.

Details

Related Gerrit Patches:
mediawiki/extensions/GrowthExperiments : masterHalt Special:Homepage flow if handling tutorial visit

Event Timeline

kostajh created this task.Jun 20 2019, 6:06 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 20 2019, 6:06 PM

Change 518098 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Halt Special:Homepage flow if handling tutorial visit

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

@nettrom_WMF @MMiller_WMF

What this bug looks like in practice:

  1. User goes to Special:Homepage
{
  "wiki": "my_wiki",
  "uuid": "d3c3b687fa2d5938bc7a1192ce61330b",
  "webHost": "kafes.local",
  "timestamp": 1561054174,
  "recvFrom": "1.0.0.127.in-addr.arpa",
  "seqId": 1,
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0",
  "revision": 19041814,
  "event": {
    "user_id": 2,
    "homepage_pageview_token": "lllhgnm93buqofbmep1goml6nccb4i9c",
    "start_email_state": "noemail",
    "user_editcount": 39,
    "referer_action": "view",
    "start_tutorial_state": "complete",
    "impact_module_state": "activated",
    "referer_namespace": 0,
    "is_mobile": true,
    "referer_route": "personaltoolslink",
    "start_userpage_state": "incomplete"
  },
  "schema": "HomepageVisit"
}
  1. User clicks on the start module overlay and clicks tutorial, or they're on desktop and they click "Tutorial". A second homepagevisit event is logged:
{
  "wiki": "my_wiki",
  "uuid": "42bc2527cc29552c824f55fae6d8235c",
  "webHost": "kafes.local",
  "timestamp": 1561054178,
  "recvFrom": "1.0.0.127.in-addr.arpa",
  "seqId": 2,
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0",
  "revision": 19041814,
  "event": {
    "user_id": 2,
    "homepage_pageview_token": "95r1cagr25poodckn774n7uu7ur8jl5n",
    "start_email_state": "noemail",
    "user_editcount": 39,
    "referer_action": "view",
    "start_tutorial_state": "complete",
    "impact_module_state": "activated",
    "is_mobile": true,
    "referer_route": "other",
    "start_userpage_state": "incomplete"
  },
  "schema": "HomepageVisit"
}

The homepage_pageview_token is different, and you should not see any other events for the second visit token since the user is now on the tutorial title.

The patch attached to this task will remove the second event altogether.

Change 518098 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Halt Special:Homepage flow if handling tutorial visit

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

The homepage_pageview_token is different, and you should not see any other events for the second visit token since the user is now on the tutorial title.

I examined the events logged around this from @MMiller_WMF's testing and confirmed that this token isn't seen anywhere else. It makes sense that it doesn't since the link-click event triggers first and uses the token from the initial page load. Since the user is on another page, we won't see any more events logged.

I've also noted that this isn't isolated to the mobile version as I can find a similar pattern on the desktop version, but not in early days after deployment. This was introduced when the mobile version arrived with the train? If so, it shouldn't significantly affect our reports and we might choose to ignore it.

MMiller_WMF renamed this task from Do not log HomepageVisit when handling tutorial visit POST requests to Homepage: do not log HomepageVisit when handling tutorial visit POST requests.Jun 20 2019, 11:03 PM
MMiller_WMF added subscribers: Catrope, SBisson, JTannerWMF and 4 others.
Etonkovidova closed this task as Resolved.Jul 4 2019, 6:40 PM