This article describes how to configure Snowplow in your Tealium iQ account.

In this article:

Table of Contents Placeholder

Snowplow is an enterprise-strength marketing and product analytics platform. You can trigger structured and unstructured event tracking when the structured/unstructured event action is defined through mapping.

The SnowPlow tag supports the E-commerce extension and can be used to map to the following:

  • Dynamically override the standard configuration values
  • Dynamically override the E-Commerce extension values
  • Trigger structured event tracking
  • Trigger unstructured event tracking

Supported Versions

  • 2.9.2

Tag Configuration

Go to the Tealium tag marketplace and add the Snowplow tag to your profile. (Learn more)

After adding the tag, configure the following settings:

  • Title
    Assign a unique name when using multiple tags by the same vendor.
  • Snowplow Object (Required)
    A unique name for your global Snowplow object. The Snowplow object name is defined as window.snowplow.name.
  • Snowplow Base URL (Required)
    URL representing the Snowplow tracker with version.
    Example format: //d1fc8wv8zag5ca.cloudfront.net/x.xx.x/sp.js
  • Tracker Namespace (Required)
    The namespace for your Snowplow tracker. Use data mapping to dynamically override this value.
  • Tracker End Point (Required)
    The collector end point URI for your Snowplow tracker. Use data mapping to dynamically override this value.
  • Cookie Domain
    The top level domain your cookies should be set at. Example .mysite.comUse data mapping to dynamically override this value.
  • Enable Link Tracking
    Add event listeners to your link clicks. Possible values are True or False. Use data mapping to dynamically override this value.
  • Enable Activity Tracking
    Enable 'page ping' events to track user activity on the page. Possible values are True or False. Use data mapping to dynamically override this value.
  • Enable Error Tracking
    Track unhandled exceptions in your JavaScript code. Possible values are True or False. Use data mapping to dynamically override this value.
  • Enable Preserve Page View
    Regenerate the webpage context only when the whole HTML page is loaded. Possible values are True or False. Use data mapping to dynamically override this value.
  • Publish Locations
    The tag will only be published to the locations selected: Dev, QA, Prod, Custom.

Advanced Settings
Descriptive notes about this tag and how it is used within your organization.

Load Rules

Load Rules determine when and where to load an instance of this tag on your site.

Recommended Load Rule: All Pages

Data Mappings

Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see data mappings.

The destination variables for the Snowplow tag are built into its Data Mapping tab. Available categories are:

Standard

Destination Name Description

Custom URL

(customURL)

Set a custom URL for the page

Custom Referrer URL

(referrerURL)

Set a custom URL for the referrer

Page Title

(pageTitle)

Set the title of the page

Cookie Time Out

(cookieTimeOut)

  • Set the time (in seconds) that the session cookie should remain active.
  • Default is 30 minutes (1800 seconds)

Enable Activity Tracking

(enableAT)

  • Enable 'page ping' events to track user activity on the page.
  • Value Options: true, false

Minimum Visit Length

(minimumVisitLength)

Set the the time between page load and the first page ping (in seconds).

Heart Beat

(heartBeat)

Set the time between page pings (in seconds).

Enable Error Tracking

(enableET)

  • Track unhandled exceptions in your JavaScript code.
  • Value Options: true, false

Preserve Page View

(preservePageView)

  • Regenerate the webpage context only when the whole HTML page is loaded.
  • Value Options: true, false

Tracker

Destination Name Description

Tracker Namespace

(trk_namespace)

  • The namespace for your Snowplow tracker.
  • Use to override the configuration settings.
  • Use this to dynamically override the configuration value.

Tracker End Point

(trk_endpoint)

  • The collector end point URI for your Snowplow tracker.
  • Use this to dynamically override the configuration value.

Cookie Domain

(trk_cookieDomain)

  • The top level domain your cookies should be set at.
  • Use this to dynamically override the configuration value.

Cookie Name

(trk_cookieName)

  • Set the base name for the Snowplow cookies.
  • Default is "sp"

App ID

(trk_appId)

  • Set the application ID for your tracker events.
  • You can send different IDs from different pages to distinguish events

Platform

(trk_platform)

Sending Tracker

(trk_send)

  • Namespace value to identify multiple items from the same source (such as ads).
  • When populated it is attached to page views, ad impressions, ad conversions, ad clicks, and link clicks.

Use Encode Base 64

(trk_encodeBase64)

  • Set whether self-describing events and custom contexts are encoded into base64.
  • Default is true.
  • Value Options: true, false

Respect Do Not Track

(trk_respectDoNotTrack)

  • Set whether the browser Do Not Track option is respected.
  • Default false.
  • Value Options: true, false

User Finger Print

(trk_userFingerprint)

  • Set whether Snowplow generates a user fingerprint based on browser features.
  • Default true.
  • Value Options: true, false

User Finger Print Seed

(trk_userFingerprintSeed)

  • Set the hash seed used to generate the user fingerprint.
  • Default is 123412414

Page Unload Timer

(trk_pageUnloadTimer)

  • Set the time period (in milliseconds) to wait before unloading the page after an event has been fired.
  • Default 500 milliseconds.

Force Secure Tracker

(trk_forceSecure)

  • Set tracker to force https even if the current page is http.
  • Default false.
  • Value Options: true, false

Send as POST

(trk_sendAsPost)

  • Set events using a POST request instead of a GET request. Default false. Value Options: true, false

Buffer Size

(trk_bufferSize)

  • Set the size of the buffer for batching events when using POST.
  • Default 1.

Max POST Bytes

(trk_maxPostBytes)

  • Set the maximum size of POST requests sent to the Collector (in bytes).
  • Default 40,000 bytes.

State Storage Strategy

(trk_storageStrategy)

  • Set the strategy for storing the tracker's state.
  • Default cookie.
  • Value Options: cookie, localStorage, none
Cookie Lifetime
(trk_cookieLifetime)
  • Set the retention time (in seconds) for the domain-specific visitor cookie.
  • Default 2 years. (There are 86,400 seconds in a day)
Context Vendor
(trk_contextVendor)
  • Set an array of predefined contexts to automatically send with every event.
  • Vendor options

E-Commerce

Since the Snowplow tag is e-commerce enabled, it will automatically use the default E-Commerce extension mappings. Manually mapping in this category is generally not needed unless you want to override any extension mappings or your desired e-commerce variable is not offered in the extension.

Destination Name Description

Order ID

(order_id)

Use this to override the default e-commerce value _corder

Order Total

(order_total)

Use this to override the default e-commerce value _ctotal
Order Shipping Amount
(order_shipping)
Use this to override the default e-commerce value _cship

Order Tax Amount

(order_tax)

Use this to override the default e-commerce value _ctax
Order Store
(order_store)
Use this to override the default e-commerce value _cstore

Order Currency

(order_currency)

Use this to override the default e-commerce value _ccurrency
Customer ID
(customer_id)
Use this to override the default e-commerce value _ccustid

Customer City

(customer_city)

Use this to override the default e-commerce value _ccity
Customer State
(customer_state)
Use this to override the default e-commerce value _cstate

Customer Country

(customer_country)

Use this to override the default e-commerce value _ccountry
List of Product Names
(product_name)
Use this to override the default e-commerce value _cprodname

List of Product SKUs

(product_sku)

Use this to override the default e-commerce value _csku

List of Product Categories

(product_category)

Use this to override the default e-commerce value _ccat
List of Product Quantities
(product_quantity)
Use this to override the default e-commerce value _cquan

List of Product Unit Prices

(product_unit_price)

Use this to override the default e-commerce value _cprice

Transaction Context Schema

(ecm_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Transaction Context Data

(ecm_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' ecm_context.data' with the name associated with your value when mapping.

Transaction User Defined Context

(ecm_contextObj)

A custom context object with schema and data properties.

Link Tracking

Destination Name Description

Enable Link Click Tracking

(enableLCT)

  • Add event listeners to your link clicks.
  • Value Options: true, false

Blacklist

(ltr_blacklist)

  • A list of CSS classes that should be ignored by the link click tracker.
  • All other links will be tracked.

Whitelist

(ltr_whitelist)

  • A list of CSS classes that should be tracked by the link click tracker.
  • All other links will be ignored.

Filter

(ltr_filter)

  • A function (or function reference) which should return either true or false.
  • All items returning true will be tracked.

Pseudo Clicks

(ltr_pseudoClicks)

  • Set whether middle clicks should be recognized as a click event.
  • Default false.
  • Value Options: true, false

Click Content

(ltr_clickContent)

  • Set whether click events should capture the innerHTML of the link.
  • Value Options: true, false
URL
(ltr_url)
  • For manually tracked events.
  • Set the target URL.

Element Id

(ltr_elementId)

  • For manually tracked events.
  • Set the link element's ID.

Element Classes

(ltr_elementClasses)

  • For manually tracked events.
  • Set the link element's classes.

Element Target

(ltr_elementTarget)

  • For manually tracked events.
  • Set the link element's target.
Element Click Content
(ltr_elementClickContent)
  • For manually tracked events.
  • Set the link element's content.

Context Schema

(ltr_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Context Data

(ltr_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' ltr_context.data' with the name associated with your value when mapping.

User Defined Context

(ltr_contextObj)

A custom context object with schema and data properties.

Ad Tracking

Destination Name Description
Ad Tracking
(adtracking)
  • Set the type of ad being tracked.
  • Ad events will only fire if this is populated.
  • Value Options: impression, click, conversion

Impression ID

(ad_impressionId)

Set the identifier for the current impression instance.

Cost Model

(ad_costModel)

  • Set the cost model for your campaign.
  • Value Options: cpc, cpm, cpa

Cost

(ad_cost)

Set the cost for the ad.
Target URL
(ad_targetUrl)
Set the destination URL for the ad.
Banner ID
(ad_bannerId)
Set the adserver identifier for the ad.

Zone ID

(ad_zoneId)

Set the adserver identifier for the zone where the ad is located.

Advertiser Id

(ad_advertiserId)

Set the adserver identifier for the advertiser the campaign belongs to.

Campaign Id

(ad_campaignId)

Set the adserver identifier for the campaign the banner belongs to.

Click Id

(ad_clickId)

Set the identifier for the current click instance.

Conversion Id

(ad_conversionId)

Set the identifier for the current conversion instance.

Category

(ad_category)

Set the category for the conversion.

Action

(ad_action)

Set the type of user interaction for the conversion.

Property

(ad_property)

Set the object description for the conversion.

Initial Value

(ad_initialValue)

Set the initial worth of the conversion.

Context Schema

(ad_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Context Data

(ad_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' ad_context.data' with the name associated with your value when mapping.

User Defined Context

(ad_contextObj)

A custom context object with schema and data properties.

Page View Custom Context

Destination Name Description

Context Schema

(cc_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.
Context Data
(cc_context.data)
  • Data values to be tracked by the context.
  • Replace the ' data' in ' cc_context.data' with the name associated with your value when mapping.

User Defined Context

(cc_contextObj)

A custom context object with schema and data properties.

Social Tracking

Destination Name Description

Action

(sot_action)

The action performed by the user.

Social Network

(sot_network)

The network the user interacted with.

Target

(sot_target)

The object the performed action is on.

Context Schema

(osot_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Context Data

(sot_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' sot_context.data' with the name associated with your value when mapping.

User Defined Context

(sot_contextObj)

A custom context object with schema and data properties.

Form Tracking

Destination Name Description

Enable Form Tracking

(enableFormTracking)

  • Set whether form changes and submissions should be tracked.
  • Value Options: true, false

Forms Custom Blacklist

(ftr_formBlacklist)

  • A list of form CSS classes that should be ignored by the form tracker.
  • All other links will be tracked. (e.g., login form, request form)

Forms Custom Whitelist

(ftr_formWhitelist)

  • A list of form CSS classes that should be tracked by the form tracker.
  • All other links will be ignored. (e.g., login form, request form)

Fields Custom Blacklist

(ftr_fieldBlacklist)

  • A list of field CSS classes that should be ignored by the form tracker.
  • All other links will be tracked. (e.g., password field, email field)

Fields Custom Whitelist

(ftr_fieldWhitelist)

  • A list of field CSS classes that should be tracked by the form tracker.
  • All other links will be ignored. (e.g., password field, email field)

Custom Form Filter Function

(ftr_filterForm)

  • A function (or function reference) which should return either true or false.
  • All items returning true will be tracked.

Custom Field Filter Function

(ftr_filterField)

  • A function (or function reference) which should return either true or false.
  • All items returning true will be tracked.

User Defined Config

(ftr_ctmConfig)

  • A custom configuration object with the above properties.
  • Use in place of the individual properties.

Cart Tracking

Destination Name Description

Cart Tracking

(cartTracking)

  • Set the type of cart event being tracked.
  • Cart events will only fire if this is populated.
  • Value Options: cart_add, cart_remove

Cart Item Sku

(cart_sku)

The sku of the item being moved in the cart.

Cart Item Name

(cart_name)

The name of the item being moved in the cart.

Cart Item Category

(cart_category)

The category of the item being moved in the cart.

Cart Item Unit Price

(cart_price)

The price of the item being moved in the cart.

Cart Item Quantity

(cart_quantity)

The quantity of the item being moved in the cart.

Cart Item Currency

(cart_currency)

The currency of the item being moved in the cart.

Context Schema

(cart_schema)

The JSON schema describing the context.

Must be present in an Iglu library.

Context Data

(cart_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' cart_context.data' with the name associated with your value when mapping.

User Defined Context

(cart_contextObj)

A custom context object with schema and data properties.

Site Search Tracking

Destination Name Description

Search Terms

(sst_terms)

  • A list of terms used in the site search.
  • Search events will only fire if this is populated.
Search Filters
(sst_filters)
A JSON object defining the filter types and terms.

Total Results Found

(sst_totalResults)

The total number of results found for the search

First Page Results

(sst_pageResults)

The number of results displayed on the first page.

Context Schema

(sst_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Context Data

(sst_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' sst_context.data' with the name associated with your value when mapping.

User Defined Context

(sst_contextObj)

A custom context object with schema and data properties.

Structured Event

Destination Name Description

Category

(stctCat)

The name of the group of objects you are tracking.

Action Name

(stctActn)

The name of the user interaction for the objects you are tracking.

Label

(stctLabel)

An additional name which identifies the specific object you are tracking.

Property

(stctProp)

An additional item describing the object or action performed on it.

Value

(stctVal)

An additional decimal number describing the user interaction.

Context schema

(stc_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.
Context Data
(stc_context.data)
  • Data values to be tracked by the context.
  • Replace the ' data' in 'stc_context.data' with the name associated with your value when mapping.

User Defined Context

(stc_contextObj)

A custom context object with schema and data properties.

Unstructured Event

Destination Name Description

Schema

(unstctDataSchema)

The JSON schema describing the event. Must be present in an Iglu library.

User Defined Data

(unstctData.data)

  • Data values to be tracked by the event.
  • Replace the ' data' in ' unstctData.data' with the name associated with your value when mapping.

User Defined Data Object

( unstctDataObj)

  • A custom configuration object with the above properties.
  • Use in place of the individual properties.

Context Schema

(stc_schema)

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Context Data

(unstc_context.data)

  • Data values to be tracked by the context.
  • Replace the ' data' in ' unstc_context.data' with the name associated with your value when mapping.

User Defined Context

(unstc_contextObj)

A custom context object with schema and data properties.

Consent Tracking

Destination Name Description

User Granted Consent

(consentGranted)

  • Used to track a user opting into data collection.
  • A consent document context is attached to the event if at least the id and version arguments are supplied.  

User Withdrew Some Consent

(consentWithdrawn)

  • Used to track a user withdrawing consent for data collection.
  • A consent document context is attached to the event if at least the id and version arguments are supplied.

User Withdrew All Consent 

(allConsentWithdrawn)

Specifies whether all consent should be withdrawn. 

Consent Document ID

(con_documentId)

  • The consent document is a custom context storing the arguments supplied to the method (in both granted and withdrawn events, this is: id, version, name, and description).
  • In either consent method, additional documents can be appended to the event by passing an array of consent document self-describing JSONs in the context argument. 

Consent Document Version

(con_documentVer)

  • Required
  • Version of the document granting consent

Consent Document Name

(con_documentName)

 Name of the consent document.

Consent Document Description

(con_documentDesc)

Description of the consent document. 

Consent Document Expiration
(con_documentExpiry)

Specifies that the user consents to the attached documents until the date-time provided, after which the consent is no longer valid. 

Context Schema
(unstc_schema)[ String]

  • The JSON schema describing the context.
  • Must be present in an Iglu library.

Context Data

( nstc_context.data)

 
  • Data values to be tracked by the context.
  • Replace the ' data' in ' unstc_context.data' with the name associated with your value when mapping.

User Defined Context

(con_contextObj)

 A custom context object with schema and data properties.

Vendor Documentation