Skip to content

Instantly share code, notes, and snippets.

@padicode
Last active December 12, 2015 06:49
Show Gist options
  • Save padicode/4731996 to your computer and use it in GitHub Desktop.
Save padicode/4731996 to your computer and use it in GitHub Desktop.
dataLayer example for Google Tag Manager
dataLayer = [{
'page': 'search',
'searchedKeyword': 'rc car',
'visitorType': 'high-value',
'nrDisplayedResults': '70',
'appliedFilters': [ 'price' : '<10' , 'color' : 'red' ], //applied filters
'nrAvailableFilters': '4', // number of available filters
'priceRanges': [ '0-10$' : '23' , '11$-49$' : '2' , '50$-99$' : '45' ], //pricing range of products
'searchCategory': 'boyToys',
'productReviews': [ '0 reviews' : '68' , 'positive reviews' : '0' , 'negative reviews' : '2' ]
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment