Page MenuHomePhabricator

Welcome emails: track homepage visits
Closed, ResolvedPublic

Description

When users receive welcome emails, the call-to-action will be to click through to visit their newcomer homepage. We want to be able to tell when users make edits in those sessions that begin with those click-throughs from the welcome emails. In order to do this, we want to log an event in the HomepageVisit schema when users click through. We can then use the timestamp of that event to count edits that likely happen as part of that session.

Specifically:

  • We need a URL for use in the welcome emails that leads to the user's newcomer homepage, and records an event in HomepageVisit once the user is on the homepage.
  • It should have referer_route value of welcomeemail-april2022.

Final result: the URL is https://es.wikipedia.org/wiki/Special:Homepage?source=welcomeemail-april2022

Implementation notes:
As long as the source=welcomeemail-april2022 query parameter, the referrer_route will be recorded.

Event Timeline

Hi @MMiller_WMF, for the value itself, can we use welcomeemail-april2022 so the format is consistent with the other values for referer_route (the other values are kebab case w/lowercase)?

The URL would be https://en.wikipedia.org/wiki/Special:Homepage?source=welcomeemail-april2022

Change 774367 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[schemas/event/secondary@master] Add welcomeemail-april2022 to homepagevisit schema

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

Change 774368 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Update homepagevisit schema to v1.4.0

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

Change 774367 merged by jenkins-bot:

[schemas/event/secondary@master] Add welcomeemail-april2022 to homepagevisit schema

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

Hi @MMiller_WMF, for the value itself, can we use welcomeemail-april2022 so the format is consistent with the other values for referer_route (the other values are kebab case w/lowercase)?

The URL would be https://en.wikipedia.org/wiki/Special:Homepage?source=welcomeemail-april2022

@MMiller_WMF That's what we've gone with in the patches that have merged, if it's important to change please let us know, but the consistency on the code side is a nice thing to have.

Change 774368 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Update homepagevisit schema to v1.4.0

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

Etonkovidova subscribed.

I'll check in production when wmf.5 will be deployed to group 2.

Presently there are three errors on Growth event validation dashboard.
The error shows /analytics/legacy/homepagevisit/1.3.0 not 1.4.0
(the error is abbreviated)

{"meta":{"domain":"en.wikipedia.org","stream":"eventlogging_HomepageVisit", "dt":"2022-03-29T23:02:58.906Z" ,"event":{"is_mobile":false,"referer_route":"welcomeemail-april2022","referer_action":"view", "schema":"HomepageVisit","wiki":"enwiki","webHost":"en.wikipedia.org","$schema":"/analytics/legacy/homepagevisit/1.3.0","client_dt":"2022-03-29T23:02:58Z","dt":"2022-03-29T23:02:58.906Z"}

Hi @Etonkovidova the errors with welcomeemail-april2022 are from when I tested setting the referrer route in production before the code changes were merged, so they should be ok.

Hi @Etonkovidova the errors with welcomeemail-april2022 are from when I tested setting the referrer route in production before the code changes were merged, so they should be ok.

Yes, no more errors were reported. I keep the task in QA column to check the end-to-end workflow.