Page MenuHomePhabricator

Add EventLogging to read more
Closed, ResolvedPublic3 Story Points

Description

Use the schema: https://meta.wikimedia.org/wiki/Schema:RelatedArticles
EventLogging should be wired up to measure impact of engagement.

  • Enable EventLogging on a 1% sample of users using read more (note read more is in beta so this will be 1% of users in beta).
  • Sample rate will be configurable by global config variable. We will tweak it as we go.
  • Send an event (loaded) when the read more code is loaded (the user is in the sample)
  • Send an event when the Read More section is first scrolled into view (seen).
  • If the user taps one of the items inside read more, send an event (click) with the index of the item that was tapped.
  • It should be possible to link the above two events to answer "if user saw read more what % engaged with it"
  • We hope that 12.5 5% of visits that see read more, engage with read more. (In apps we saw 12.5% but we expect them to be a more engaged audience)
  • Events should include a unique user session id, whether they were generated by api or magic word

Event Timeline

Jdlrobson raised the priority of this task from to Normal.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: KLans_WMF, JKatzWMF, phuedx and 3 others.

@JKatzWMF and @Jdlrobson will chat about his today

@Jdlrobson - obviously we did not get a chance to chat on Monday.

Given what the apps team implemented, I think we should do something similar:

event is triggered on page load 'shown'
event is triggered when 'read more' appears onscreen 'click', position of clicked item
'source' of suggestion (name of service used, or manual)--this way we can compare any improvements to suggestions.

ideally we could ensure links-clicked were accretive (rather than cannabalistic) by looking at overall clicks on the page (or at pageview #s referred to by the page), but not sure how that would be done.

Jdlrobson renamed this task from [placeholder] Add EventLogging to read more to Add EventLogging to read more.Oct 9 2015, 4:13 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson set Security to None.
Jdlrobson updated the task description. (Show Details)Oct 9 2015, 5:11 PM
Jdlrobson updated the task description. (Show Details)Oct 27 2015, 4:06 PM
Jdlrobson updated the task description. (Show Details)Oct 27 2015, 8:46 PM

Have added schema and clarified acceptance criteria for whoever is implementing this.

Are you working on this task, @Jdlrobson? It's assigned to you but it's in the todo column.

Jdlrobson removed Jdlrobson as the assignee of this task.Oct 28 2015, 5:07 PM

Change 249798 had a related patch set uploaded (by Bmansurov):
Add event logging to read more

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

Moving back to 'todo' as the blocked by task needs to be worked on first.

Change 251001 had a related patch set uploaded (by Bmansurov):
Add event logging to read more

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

Change 249798 abandoned by Bmansurov:
Add event logging to read more

Reason:
switched to the dev branch

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

There is a minor PHP code style violation that needs to be fixed.

phuedx added a subscriber: Krinkle.Nov 6 2015, 1:04 PM

251001 has a minor from @Krinkle. There's no associated C:-1, however, but I think his comment is worth following up on.

Ignore that last remark. I was looking at an older revision of the change.

phuedx added a comment.Nov 6 2015, 1:21 PM

I've reviewed 251001 and tested it locally and it LGTM.

There's a little bit more work around softening the dependency on EventLogging: the build is failing because of an unmet dependency on an EL module (hard) but we're using mw.track log events if EL is available (soft).

Change 251001 merged by jenkins-bot:
Add event logging to read more

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

phuedx added a comment.EditedNov 11 2015, 12:22 PM

I've added the following to the reading-web-staging RelatedArticles config:

$wgRelatedArticlesShowReadMore = true;
$wgRelatedArticlesLoggingSamplingRate = 1;

I've enabled the eventlogging extension, however I don't see that events are being sent. It maybe because mw.config.get('wgRelatedArticlesShowReadMore') is returning null. The second config variable is working though. I'd love to explore more, but since the patch is written by me, I'd rather someone else sign off on this task.

I'd love to explore more, but since the patch is written by me, I'd rather someone else sign off on this task.

Absolutely! I'm on it.

I've enabled the eventlogging extension, however I don't see that events are being sent. It maybe because mw.config.get('wgRelatedArticlesShowReadMore') is returning null.

The RelatedArticlesShowReadMore config variable isn't forwarded to the client like the others. Instead, it's used to control whether or not the bootstrap module gets added to the output.

I've tested this on reading-web-staging and can confirm that I see the ready, seen, and clicked RelatedArticles events being logged.

phuedx closed this task as Resolved.Nov 12 2015, 9:58 AM