Versions Compared

Key

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

...

Oscar ships with an Analytics app used to gather data on products and users. It does this by leveraging Django's signal dispatcher, listening for signals from other apps and using these signals as cues to create and update models which aggregate data on product views, user searches, basket additions, and the placing of orders. The Analytics app also includes a reporting module capable of generating CSV and HTML reports on product performance (e.g., views, basket additions, purchases, by product) and user behavior (e.g., product views, basket additions, orders, total spent, date of last order, by user).

If necessary, we can extend Oscar's Analytics app by extending existing receivers or adding new signals and receivers. For example, if we want to send an event to Google Analytics whenever a new order is placed, we could extend the existing order_placed receiver to do this, or create a new receiver which listens to the same signal and communicates with Google Analytics.

A Note About Enrollments

Orders for enrollments are fulfilled by the enrollment API, not Oscar. As such, it's not appropriate to emit events related specifically to enrollment from within Oscar. These kinds of events (e.g., edx.course.enrollment.enrollment.activated, edx.course.enrollment.enrollment.deactivated, edx.course.enrollment.enrollment.mode_changed, edx.course.enrollment.upgrade.succeeded) are emitted from within edx-platform.