Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

This is a work in progress. Hopefully one day it can be made to be more globally useful.

General Resources

Note that much of this information is specifically geared toward edX.


This page supplements the wealth of knowledge in /wiki/spaces/AN/overview

...

and 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 event should make it NAMING CONVENTION

Determine if your new event is a research event for partners that goes into the publicly documented data package, or if whether it will only be used for internal BI purposes.  For this, you use a special prefix on the event name,  

  • For internal-only events, use the special prefix 'edx.bi.'

...

  • for your event name.
  • For research events, make sure you tag someone on the Docs team, to make sure your new event is documented in the edX Research Guide.

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 a native client-side feature.

Implementing in edx-platform

Implementing events in edx-platform is documented in the edX Developer's Guide and /wiki/spaces/AN/pages/30967007.  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 to server-side events.  Server-side events are less likely to have false duplicate events.
  • Call tracker.emit
    • Emits to Tracking Log and downstream tools (e.g. Vertica/Tableau, edX Research Package, etc.)
    • Emits Event must be whitelisted to also be emitted to Segment.  
  • Client-side events can easily have bad duplicates.  Use server-side events when and where possible.
  • Logger.log
    • Note: Should
      • In turn,
      • based on whitelist, events are sent to
      • Segment emits to other tools: Google Analytics (GA)

Client-side events

  • To send events directly to Segment:
    • This is appropriate when server-side event does not need to appear in tracking logs.
    • Call segment.track(), after "from common.djangoapps.track import segment".
    • If appropriate, also call segment.identify().  Currently the LMS only does this at login/registration.   

Client-side events

  • Rule of thumb: Where you have an option of client-side or server-side event, choose server-side (see above).
  • Tracking Log (and possibly Segment)
    • MFEs: sendTrackingLogEvent
    • Legacy code: Logger.log
    • Important: This should be renamed to Tracker.emit, but that requires a deprecation strategy including telling course teams.
    • Emits to Tracking Log and downstream tools only.
    analytics.track
    • Emits to Segment.In turn, emits to other tools (GA, Google Tag Manager, Optimizely, Qualaroo, Crazy Egg, Marketing tools(e.g. Vertica/Tableau, edX Research Package, etc.)
    • Event must be whitelisted to emit to Segment (see above).
  • Segment (and downstream tools)
    • MFEs: sendTrackEvent
    • Legacy code: analytics.track
    • Use this if you want Segment and its downstream tools only.  If you want the Tracking Log or both, use the other call (with or without the whitelist).
    • Emits to Segment and its downstream tools.

Ecommerce Events

For any ecommerce related activity, including any messages encouraging a purchase, you can use Segment's Ecommerce Events.  

Any message encouraging a user to purchase could be considered a Segment Ecommerce "Promotion" Event. These, in turn, can be tracked in Google Analytices: Conversions > Ecommerce > Marketing > Internal Promotions.  Here is an example of implementing a "promotion" event in edx-platform for a verified upgrade reminder.

Analytics Tool Usage by Team

TeamSub-TeamDetailsTools
LearnerMercury TeamHow we workGoogle Analytics (GA), Tableau, and Optimizely.

Tools

Analytics Tools:

  • Google Analytics (GA)
  • Google Tag Manager
  • Firebase Analytics
  • Fabric (Gabe said ?Mobile)
  • Segment (a.k.a. Segment.io)
  • Tracking Log
  • Optimizely (A/B Testing)
  • Qualaroo (survey tool)
  • Crazy Egg (screen recording/heat mapping, may or may not be used)
  • Marketing
    • Sailthru (email marketing)
    • Facebook ad reporting

Diagnostic Tools (includes Performance):

Other Concerns

...

Consider the following data storage questions:

  • Limits (e.g. Splunk Logs)
  • Privacy (who has access?)
  • How long does data live?