Schema: https://gerrit.wikimedia.org/r/c/schemas/event/secondary/+/773382/2/jsonschema/analytics/mediawiki/wikistories_consumption_event/1.0.0.json (there's an example of an event at the bottom of the schema)
Instrumentation plan: https://docs.google.com/document/d/10saUCO6lIl8CsSJ4wOOuEfDlyagdP3DMXFP9q4ByMP8/edit#heading=h.187jptb4zpka
Events to log:
- story_impression
- story_view
Fields to log for each event is described in the plan and the schema.
Example event logging from javascript
mw.eventLog.submit( 'analytics/mediawiki/wikistories_consumption_event', { "$schema": "/analytics/mediawiki/wikistories_consumption_event/1.0.0", "meta": { "stream": "mediawiki.wikistories_consumption_event", "domain": "id.m.wikipedia.org", "dt": "2022-11-11T00:40:00.649Z" }, "event_type": "story_view", "activity_session_id": "46e8e1f264c66cbf13fa", "pageview_id": "0578dbb2215dc583d147", "access_method": "mobile web", "page_title": "Istanbul", "page_story_count": 3, "page_visible_time": 84124, "story_open_time": 29018, "referrer_type": "internal", "story_title": "Kucing_Istanbul", "story_frame_count": 6, "story_frames_viewed": 6, "story_completed": true, "next_story_opened": false, "experiment_group": "wikistories", "experiment_entry_date": "2022-10-27", "session_is_first_of_day": true, "session_days": [ 1, 4, 5, 9, 16 ] } );