This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// These values could be used in every measurement. To keep the Github clean, we refer to this part: | |
... | |
'products': [{ | |
'name': 'Alfa Romeo Stelvio 2016-heden Car-Bags reistassenset', // productname | |
'id': '8718885903508', // EAN | |
'price': '309.00', // use a . as seperator | |
'brand': 'Car Bags', // if there is only one brand, just use the company name: Car Bags / Car Parts Expert | |
'category': 'Reistassen/Audi/A6', // use a forward slash (/) to add sub-categories e.g. Brand and Model | |
'variant': '3 trolleytassen', // in case this applies, same product but different variant, e.g. color 'red/black' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Toevoegen van een product aan de winkelwagen. | |
dataLayer.push({ | |
'event': 'addToCart', | |
'ecommerce': { | |
'currencyCode': 'EUR', | |
'add': { // 'add' actionFieldObject measures. | |
'products': [{ // adding a product to a shopping cart. | |
'name': 'Runderbouillon', // Naam of ID is een verplicht veld. | |
'id': '12345', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generic GTM Container Tracker! | |
// GTM code that needs to be placed within the <head></head> section of the page. | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-MCW6MJ');</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataLayer.push({ | |
'event': 'checkout', | |
'ecommerce': { | |
'checkout': { | |
'actionField': {'step': 1}, | |
'products': [{ | |
'name': 'Productnaam', | |
'id': 'ProductID', | |
'price': '123.45', | |
'brand': 'Merk', |