Add PWA analytics events #1208
Labels
complexity: moderate
Time needed to do this ticket will be moderate e.g. 1-2 days
feature/enhancement
New feature or request
first-timers-friendly
Appropriate for first time contributors.
good first issue
Good for newcomers
state: blocked
Task is blocked.
Milestone
Overview
This task is subsequent to the issue #1207 and #1209 where new PWA install components were added. This task involves adding analytics events to our new PWA install components and functionality. See #1207 for context.
We already have a widely used function
logEvent()
inutils/logEvent.ts
and pattern for passing event parameters usinglogEvent(EVENT_NAME, userEventData)
which includes relevent user parameters to every event, alongside any additional event-specific parameters e.g. in this case we'll includebrowser
as a parameter.To test that analytics events are being triggered, check the console log where events should be shown.
Action Items
user clicked install button
using our existinglogEvent()
function and newPWA_INSTALL_CLICKED
event. SenduserEventData
params with the event. Send additionalbrowser
property in the event params.user clicked not now button
using our existinglogEvent()
function and newPWA_DISMISS_CLICKED
event. SenduserEventData
params with the event. Send additionalbrowser
param.logEvent()
function and newPWA_INSTALLED
event. SenduserEventData
params with the event. Send additionalbrowser
param.user viewed desktop banner
using our existinglogEvent()
function and newPWA_DESKTOP_BANNER_VIEWED
event. SenduserEventData
params with the event. Send additionalbrowser
param. Send additionalorigin_page: "courses"
param.The text was updated successfully, but these errors were encountered: