- The ability to set a site ID for your tracking – useful for multi-site publishers
- The ability to log ecommerce transactions – useful for merchants wanting to track orders
We’ll take a look at both of these new features in turn:
setSiteId() – it takes one argument, the identifier you have assigned to this site. For example:
The querystring passed to your Snowplow collector will now include the following parameter:
said stands for Site or App ID – because we plan on using the same parameter for mobile and desktop app tracking as well.
This new feature should be helpful for anyone running multiple sites (or perhaps clients) against the same Snowplow collector – it means that you can easily partition your Snowplow events by site, whilst still being able to run cross-site analyses should you so wish.
Note that we haven’t yet added extracting
said to our ETL process, but we have an open ticket for this.
To date, we have been analysing e-commerce transactions using Snowplow by:
- Logging every product add to basket event
- Logging every product remove from basket event
- Netting these events off to determine the final contents of the order
The idea is that you add the new tracking code to your shop’s checkout confirmation page, so that the completed order can be sent to Snowplow. A complete example of the new tracking code looks like this:
The above example creates an order (aka “transaction”) with ID
order-123 and then adds two line items (two blue t-shirts and one pair of red shoes) as line items to the order. The final
trackTrans call sends this complete order to Snowplow as three separate events – one each for the order and its line items.
This new functionali
ty should be useful for anybody who wants to track orders transacted in a online shopping cart such as Magento, PrestaShop or Spree.
Note that we haven’t yet added extracting these e-commerce orders to our ETL process, but we have an open ticket for this.
A final note to say thanks again to Simon Andersson for contributing the ecommerce tracking functionality! Community contributors like Simon A and Simon R(umble) are helping us to quickly make the Snowplow vision a reality.
And of course, we welcome contributions across the five Snowplow sub-systems. If you would like help implementing a new tracker, trying a different ETL approach or loading Snowplow events into an alternative database, please get in touch!