...
- /wiki/spaces/AN/overview (Tons wealth of informationknowledge)
- Mobile Analytics
Analytics Events
...
in edx-platform
...
Designing new events
When designing new events, see the /wiki/spaces/AN/pages/13205895.
One decision to be made is whether or not the Determine if your new event should make it into the publicly documented data package, or if it will only be used for internal purposes. For thisinternal-only events, you use a the special prefix on the event name, 'edx.bi.' , which will filter the events from the data package.In addition to choosing for your event name.
Choose between server-side and client-side implementation of the event, and consider whether or not Mobile Analytics events need to be implemented separately for your featurea native client-side feature.
Implementing in edx-platform
Implementing events in edx-platform is documented in Read the Docs, but this section provides some additional clarity and examples.
Server-side events (includes celery)
- Rule of thumb: Use server-side events where possible. More context is available. Less likely to have false duplicate events.
- tracker.emit
- Emits to Tracking Log and downstream tools (e.g. Vertica/Tableau, edX Research Package, etc.)
- Emits to Segment.
- In turn, based on whitelist, events are sent to Google Analytics (GA)
Client-side events
- Client-side events can easily have bad duplicates. Use server-side events when and where possible.
- Logger.log
- Note: Should be renamed to Tracker.emit, but requires a deprecation strategy including telling course teams.
- By default, emits to Tracking Log and downstream tools only.
- If you want to emit to segment as well, use this call and add the events to a whitelist that the Tracking Log will emit to segment.
- analytics.track
- Emits to Segment.
- In turn, emits to other tools (GA, Google Tag Manager, Optimizely, Qualaroo, Crazy Egg, Marketing tools.
- Use this if you want Segment only. If you want Tracking Log or both, use the other call (with or without the whitelist).
- Emits to Segment.
...