Javascript Tracker - OXYGEN-MARKET/oxygen-market.github.io GitHub Wiki
HOME » SNOWPLOW TECHNICAL DOCUMENTATION » Trackers » JavaScript Tracker
- 1 Overview
- 2 General parameters
- 2.1 Loading Snowplow.js
- 2.2 Initialising a tracker
- 2.2.1 Setting the application ID
- 2.2.2 Setting the platform
- 2.2.3 Configuring the cookie domain
- 2.2.4 Configuring the cookie name
- 2.2.5 Configuring base 64 encoding
- 2.2.6 Respecting Do Not Track
- 2.2.7 User fingerprinting
- 2.2.8 Setting the user fingerprint seed
- 2.2.9 Setting the page unload pause
- 2.2.10 Altering cookies
- 2.3 Other parameters
- 2.4 Managing multiple trackers
- 2.5 How the Tracker uses cookies
- 3 Specific Event Tracking
- 3.1 Pageviews
- 3.1.1
trackPageView
- 3.1.1
- 3.2 Pagepings
- 3.2.1
enableActivityTracking
- 3.2.1
- 3.3 Ecommerce transaction tracking
- 3.3.1
addTrans
- 3.3.2
addItem
- 3.3.3
trackTrans
- 3.3.4 Pulling it all together: an example
- 3.3.1
- 3.4 Social tracking
- 3.4.1
trackSocialInteraction
- 3.4.1
- 3.5 Campaign tracking
- 3.6 Ad tracking methods
- 3.7 Tracking custom structured events
- 3.7.1
trackStructEvent
- 3.7.1
- 3.8 Tracking custom self-describing (unstructured) events
- 3.8.1
trackSelfDescribingEvent
- 3.8.1
- 3.9 Link click tracking
- 3.9.1
enableLinkClickTracking
- 3.9.2
refreshLinkClickTracking
- 3.9.3
trackLinkClick
- 3.9.1
- 3.10 Form tracking
- 3.10.1
enableFormTracking
- 3.10.1
- 3.11
trackAddToCart
andtrackRemoveFromCart
- 3.12
trackSiteSearch
- 3.13
trackTiming
- 3.14 Enhanced Ecommerce tracking
- 3.15 Custom contexts
- 3.16 Error tracking
- 3.16.1
trackError
- 3.16.2
enableErrorTracking
- 3.16.1
- 3.17 Setting the true timestamp
- 3.1 Pageviews
- 4 Advanced usage of the JavaScript Tracker
- 5 Modifying Snowplow JS
- 6 For developers
The Snowplow JavaScript Tracker works in much the same way as JavaScript trackers for other major web analytics solutions including Google Analytics and Omniture. We have tried, as far as possible, to keep the API very close to that used by Google Analytics, so that users who have implemented Google Analytics JavaScript tags have no difficulty also implementing the Snowplow JavaScript tags.
Tracking is done by inserting JavaScript tags onto pages. These tags run functions defined in tracker.js, that trigger GET requests of the Snowplow pixel. The JavaScript functions append data points to be passed into Snowplow onto the query string for the GET requests. These then get logged by the Snowplow collector. For a full list of data points that can be passed into Snowplow in this way, please refer to the Snowplow tracker protocol documentation.
The JavaScript Tracker supports both synchronous and asynchronous tags. We recommend the asynchronous tags in nearly all instances, as these do not slow down page load times.