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
| /* EEC ProductsIDs - Custom JS for GTM - update 09-2018 MR//PD | |
| - EEC dataExtract for FBads, ADW, and 3rdParty | |
| - This function create new array and interact with it | |
| - Combine differents cases, when exist '/p/' product URL, '/c/' category URL, '/search/' searchQuery in URL, or event 'addToCart' | |
| - | |
| */ | |
| function() { | |
| try{ |
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
| * EEC CategoryName - Custom JS for GTM - update 09-2018 MR//PD | |
| - EEC dataExtract for FBads, ADW, and 3rdParty | |
| - This function create new array and interact with dataLayer | |
| - {{dlv - pageHierarchy}} is a custom variable, or dataLayer extract categories levels as Array | |
| */ | |
| function() { | |
| try{ | |
| if({{Page Path}}.indexOf('/p/') != -1){ |
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
| /* EEC ProductsName - Custom JS for GTM - update 09-2018 MR//PD | |
| - EEC dataExtract for FBads, ADW, and 3rdParty | |
| - This function create new array and interact with it | |
| - Combine differents cases, when exist '/p/' product URL, '/c/' category URL, '/search/' searchQuery in URL, or event 'addToCart' | |
| - | |
| */ | |
| function() { | |
| try{ |
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
| /*EEC productPrice from DLV detailProducts - update 09-2018 MR//PD | |
| - dataExtract for FBads, ADW, and 3rdParty | |
| - create new ARRAY with floatValues per each prods price | |
| */ | |
| function() { | |
| try{ | |
| var products = {{dlv - ecommerce.detail.products}}; | |
| return parseFloat(products.map(function(prod) { return prod.price; }).join()); | |
| } catch(e){ |
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
| /* ProductDetails as ViewContent for Google Tag Manager - Update 10.2018 MR//PD | |
| Trigger: Service webpage or Product webpage page loaded | |
| Remember: Set Tag Sequencing load before main pageView FBads tag | |
| */ | |
| <script> | |
| fbq('track', 'ViewContent', { | |
| value: {{cJS - EEC - product.detail.price}}, //product detail Price as FLOAT | |
| currency: 'EUR', // currency as STRING |
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
| /* mainFacebookADS pixel code customized for Google Tag Manager - Update 10.2018 MR//PD | |
| Trigger: tag works in all PageViews or custom webpages | |
| Remember: Put outside noscript PIXEL_code into custom IMG | |
| */ | |
| <!-- Facebook Pixel Code --> | |
| <script> | |
| !function(f,b,e,v,n,t,s) | |
| {if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
| n.callMethod.apply(n,arguments):n.queue.push(arguments)}; |
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
| <script id = "Cookiebot" src = "https://consent.cookiebot.com/uc.js?cbid={{CookieBotId}}" type = "text / javascript"> </ script> | |
| <script> | |
| función CookiebotCallback_OnAccept () { | |
| if ((Cookiebot.consent.preferences) && (CookieConsent.preferences {{}}! = "true")) | |
| dataLayer.push ({ 'evento': 'cookieconsent_preferences'}); | |
| if ((Cookiebot.consent.statistics) && CookieConsent.statistics {{}}! = "true") | |
| dataLayer.push ({ 'evento': 'cookieconsent_statistics'}); | |
| if ((Cookiebot.consent.marketing) && CookieConsent.marketing {{}}! = "true") | |
| dataLayer.push ({ 'evento': 'cookieconsent_marketing'}); | |
| } |
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
| <script> | |
| /** | |
| * A function to handle a click on a checkout button. This function uses the eventCallback | |
| * data layer variable to handle navigation after the ecommerce data has been sent to Google Analytics. | |
| */ | |
| function onCheckout() { | |
| dataLayer.push({ | |
| 'event': 'checkout', | |
| 'ecommerce': { | |
| 'checkout': { |
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
| // Measure the removal of a product from a shopping cart. | |
| dataLayer.push({ | |
| 'event': 'removeFromCart', | |
| 'ecommerce': { | |
| 'remove': { // 'remove' actionFieldObject measures. | |
| 'products': [{ // removing a product to a shopping cart. | |
| 'name': 'Triblend Android T-Shirt', | |
| 'id': '12345', | |
| 'price': '15.25', | |
| 'brand': 'Google', |
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
| // Measure adding a product to a shopping cart by using an 'add' actionFieldObject | |
| // and a list of productFieldObjects. | |
| dataLayer.push({ | |
| 'event': 'addToCart', | |
| 'ecommerce': { | |
| 'currencyCode': 'EUR', | |
| 'add': { // 'add' actionFieldObject measures. | |
| 'products': [{ // adding a product to a shopping cart. | |
| 'name': 'Triblend Android T-Shirt', | |
| 'id': '12345', |