Exploring Business Requirements

High-level business requirement questions:

- What are the business requirements for tracking events for the header?
- What are the business requirements for generic event tracking?
- What is the overlap?

Notes

Additional related questions:

Example Header Events (Prospectus):

User Menu and Site Navigation:

window.analytics.track('edx.bi.link.header_navigation.clicked', {
  category: 'navigation',
  label,
  link: event.currentTarget.href,
  mobile: false,
});

analyticsAllSearch() {
window.analytics.track('edx.bi.user.search.submitted', {
  category: 'search',
});
}

analyticsSearch(label) {
window.analytics.track('edx.bi.user.query.submitted', {
  category: 'search',
  label,
});


Footer:

window.analytics.track('edx.bi.footer.link', {
  category: 'outbound_link',
  label: $link.attr('href')
});


Exploring Potential Implementations

The intention is to move this to an RST doc at some point.  If we need/want to capture comments sooner rather than later, I can do that sooner rather than later.


This section details some exploration regarding both our microfrontend apps and for shared components.

Background

The LMS provides the ability to send events to Segment or to the tracking log (and potentially on to Segment).  At this time, these docs do not yet cover events that go to the tracking log.

Regarding front-end library selections for analytics, different microfrontend applications have selected different libraries.  Given that, each library needs to be reviewed in relation to the functionality it is providing.

Setting up Segment for a new Microfrontend

/wiki/spaces/AN/pages/938705325

Identify User

When using Segment, we need to call window.analytics.identify() with the appropriate user identification details.

Passing Analytics Properties to Children

One may need the ability to pass analytics properties from parents to children, so it is available when a child component tracks an event, without the child needing to know about its context.

Firing Analytics Events

Sending events to the (LMS) Tracking Log

See "Consolidating Event Tracking" section first.  This section is older.


Microfrontends (e.g. User Account with Profile):

Consolidating Event Tracking

QA for Events and Configuration

It would be great to find ways to make this simpler. Here is an example testplan for the Profile microfrontend events.