/dbt-snowplow-ecommerce

A fully incremental model, that transforms raw ecommerce event data generated by the Snowplow JavaScript tracker into a series of derived tables representing various ecommerce data objects.

Primary LanguageShellApache License 2.0Apache-2.0

early-release Release License Discourse posts

snowplow-logo

Snowplow E-Commerce

This dbt package:

  • Transforms and aggregates raw web e-commerce event data collected from the Snowplow JavaScript tracker into a set of derived tables based around the following e-commerce data objects: carts, checkouts, products and transactions.
  • Processes all e-commerce events incrementally. It is not just constrained to out-of-the-box events - any custom events you are tracking will also be incrementally processed.
  • Is designed in a modular manner, allowing you to easily integrate your own custom SQL into the incremental framework provided by the package.

Please refer to the doc site for a full breakdown of the package.

Adapter Support

The snowplow-ecommerce v0.2.0 package currently supports BigQuery, Databricks and Snowflake. Future support is expected for Redshift & Postgres.

Warehouse dbt versions snowplow-ecommerce version
BigQuery, Databricks, Snowflake >=1.0.0 to <2.0.0 0.2.0

Requirements

  • A dataset of web events from the Snowplow JavaScript tracker must be available in the database.
  • Have the webPage context enabled.
  • Have the following e-commerce contexts enabled: user, checkout_step, page, transaction, cart
  • Track the e-commerce tracking action events on your website

Installation

Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.

Configuration & Operation

Please refer to the doc site for details on how to configure and run the package.

Models

The package contains multiple staging models however the mart models are as follows:

Model Description
snowplow_ecommerce_cart_interactions A table that provides insights into actions that occurred with carts, such as adding and removing to cart.
snowplow_ecommerce_sessions A table that provides insights into all of the e-commerce interactions that a occurred during a session as defined by the domain_sessionid.
snowplow_ecommerce_checkout_interactions A table that provides insights into the checkout steps that were stepped through, including information that was filled out throughout the process
snowplow_ecommerce_product_interactions A table that provides information into the products that were viewed, either on product pages or in product lists, and how those products were later interacted with, e.g. through adding to cart.
snowplow_ecommerce_transaction_interactions A table that provides insights into which transactions transpired, their value, how many products they contained, etc.

Join the Snowplow community

We welcome all ideas, questions and contributions!

For support requests, please use our community support Discourse forum.

If you find a bug, please report an issue on GitHub.

Copyright and license

The snowplow-ecommerce package is Copyright 2022-2023 Snowplow Analytics Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.