Skip to content

Instantly share code, notes, and snippets.

@yalisassoon
yalisassoon / custom-event-functionality-spec.md
Last active December 29, 2015 17:29
Initial specification for Snowplow custom events functionality

Custom event functionality: initial specification

1. Defining custom events

Snowplow users specifies their own custom event dictionary as a YAML. This is a list of all the different event types in their own custom dictionary:

- event_type: product_view
- event_type: add_to_basket
- event_type: submit_transaction
// Alias. Worth keeping in because it's so verbose.
var encodeWrapper = window.encodeURIComponent;
// This is the crust ol' code for building a request.
// Two things:
// 1. You won't be able to populate all of these
// 2. You will need to come up with some custom values - e.g. for tv (tracker version), maybe no-js-0.1.0
// 3. Rather than this crusty code, you can build the whole thing up using requestStringBuilder, see below for code and example
request +=

itemViewTrack

Details

Reference: snowplow/snowplow#113
Idea from: https://github.com/kingo55

Summary

This is a new feature to track views of products on ecommerce sites, or suggested articles on a media site, similar to how Google AdWords tracks ad views in different positions on a page.