Open
Description
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()
in utils/logEvent.ts
and pattern for passing event parameters using logEvent(EVENT_NAME, userEventData)
which includes relevent user parameters to every event, alongside any additional event-specific parameters e.g. in this case we'll include browser
as a parameter.
To test that analytics events are being triggered, check the console log where events should be shown.
Action Items
- Add an analytics event for
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. - Add an analytics event for
user clicked not now button
using our existinglogEvent()
function and newPWA_DISMISS_CLICKED
event. SenduserEventData
params with the event. Send additionalbrowser
param. - Add an analytics event for app install, using our existing
logEvent()
function and newPWA_INSTALLED
event. SenduserEventData
params with the event. Send additionalbrowser
param. - Add an analytics event for
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. - [Bonus] Complete the next issue for this epic - Add PWA detection analytics event #1211