Skip to content

Instantly share code, notes, and snippets.

// 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.