Skip to content

Add PWA analytics events #1208

Open
Open
@annarhughes

Description

@annarhughes

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 existing logEvent() function and new PWA_INSTALL_CLICKED event. Send userEventData params with the event. Send additional browser property in the event params.
  • Add an analytics event for user clicked not now button using our existing logEvent() function and new PWA_DISMISS_CLICKED event. Send userEventData params with the event. Send additional browser param.
  • Add an analytics event for app install, using our existing logEvent() function and new PWA_INSTALLED event. Send userEventData params with the event. Send additional browser param.
  • Add an analytics event for user viewed desktop banner using our existing logEvent() function and new PWA_DESKTOP_BANNER_VIEWED event. Send userEventData params with the event. Send additional browser param. Send additional origin_page: "courses" param.
  • [Bonus] Complete the next issue for this epic - Add PWA detection analytics event #1211

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions