Snowplow E-commerce Package
The Snowplow e-commerce data model aggregates Snowplow's out of the box
snowplow_ecommerce_action events to create a set of derived tables based on the e-commerce data objects - carts, checkouts, products, transactions, users - that contain many useful dimensions as well as calculated measures.
The package contains multiple staging models however the mart models are as follows:
- Base: Performs the incremental logic, outputting the table
snowplow_ecommerce_base_events_this_runwhich contains a de-duped data set of all events required for the current run of the model, and is the foundation for all other models generated.
- Carts: Parses the cart interactions that occur to provide handy filters and aggregations, which helps identify what happened to carts on a session level to extract, for example, abandoned carts with ease. The Carts module outputs the tables
- Checkouts: Parses checkout steps that occur to provide handy filters and aggregations to help identify which checkout steps were walked through, and what details were entered in each of these steps. This lends itself well to a funnel analysis. The Checkouts module outputs the
- Products: Parses product view and list information to provide insights into which products were being viewed, what details were being shown to the end user and how the user then interacted with these products. The Products module outputs the
- Transactions: Parses transaction actions to provide insights into which transactions occurred, how much revenue was generated from them, and other insights leveraging the many properties of the transaction e-commerce context. The Transactions module outputs the
- Sessions: Aggregates all other data into a sessions table which leverages the
domain_sessionid, outputting the
Mixing web and mobile events
The package makes no distinction between events tracked from the web and those tracked from a mobile application, so long as you are tracking
snowplow_ecommerce_action events and from allowed
sessionId from the
client_session context, and the
id from the
mobile_screen context, overwrite the
page_view_id fields respectively in our intermediate and derived tables, for events where they are populated. If you are just using web events, the package will work out the box. If you are using a mix of web and mobile events, you will need to enable set the
snowplow__enable_mobile_events package variable to
true and events will be processed from both sources. If you are only tracking mobile events, the package will work with the variable set, however you must have the
webPage context available in your warehouse (even though it will not be populated for these mobile events) for the package to run.