{"version":3,"sources":["webpack:///./LeLab.Gcv.Web/src/common/com-ga-tracking/com-ga-tracking.chunk.js"],"names":["$","require","$document","document","Logger","langIdSuffix","window","location","href","indexOf","String","prototype","replaceAll","search","replacement","target","replace","RegExp","GaTracker","pSource","pEventName","pItems","source","eventName","items","Log","gtag","action","event","parameters","err","GaGenericErrorTracking","onerror","message","lineno","colno","error","exceptionDescription","errorTracker","track","GaCommonEecTracking","$containers","instance","each","trackProductsContainerPrints","$container","data","trackViewItemList","trackProductClicks","trackViewItem","trackCheckoutSteps","trackCheckoutPurchase","$viewItems","trackItems","$viewItemList","listPosition","parseInt","isNaN","qty","price","parseFloat","trackItem","push","tracker","$viewItem","off","on","e","step","$itemsContainer","$items","$item","checkout_step","$amountsContainer","overlayId","$overlayContainer","trackOverlayProduct","lastActions","AppliedActions","trackShoppingCartActions","i","length","appliedAction","ActionType","trackAddItemAction","ProductId","ProductCategory","ProductName","ProductTitle","AppAlias","ProductPrice","Quantity","trackRemoveItemAction","productId","productCategory","productName","productVariant","brand","trackAction","init","gaGenericErrorTrackingInstance","trackGenericError","gaCommonEecTrackingInstance","trackProductsContainersPrints","bindOverlayTrackingEvents","bindShoppingCartTrackingEvents"],"mappings":";;;;;;;;;;;;AAAA,IAAIA,IAAI,mBAAAC,CAAQ,CAAR,CAAR;AACA,IAAIC,YAAYF,EAAEG,QAAF,CAAhB;AACA,IAAIC,SAAS,mBAAAH,CAAQ,EAAR,CAAb;AACA,IAAMI,eAAeC,OAAOC,QAAP,CAAgBC,IAAhB,CAAqBC,OAArB,CAA6B,MAA7B,IAAuC,CAAC,CAAxC,GAA4C,KAA5C,GAAoD,KAAzE;;AAEAC,OAAOC,SAAP,CAAiBC,UAAjB,GAA8B,UAAUC,MAAV,EAAkBC,WAAlB,EAA+B;AACzD,QAAIC,SAAS,IAAb;AACA,WAAOA,OAAOC,OAAP,CAAe,IAAIC,MAAJ,CAAWJ,MAAX,EAAmB,GAAnB,CAAf,EAAwCC,WAAxC,CAAP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AAhB;;AAEA,gBAAIE,UAAU,IAAI7C,SAAJ,CAAc,aAAd,EAA6BS,MAA7B,EAAqC,EAAC,SAAS0B,UAAV,EAArC,CAAd;AACAU,oBAAQxB,KAAR;AACH;;;;;;AAIL,IAAI4D,OAAO,SAAPA,IAAO,GAAY;;AAEnB,QAAIC,iCAAiC,IAAIrE,sBAAJ,EAArC;AACAqE,mCAA+BC,iBAA/B;;AAEA,QAAIC,8BAA8B,IAAI9D,mBAAJ,EAAlC;AACA8D,gCAA4BC,6BAA5B,CAA0DvG,EAAE,yBAAF,CAA1D;AACAsG,gCAA4BE,yBAA5B;AACAF,gCAA4BG,8BAA5B;AACH,CATD;;AAWAN;;AAEAjG,UAAU+D,GAAV,CAAc,sCAAd;AACA/D,UAAUgE,EAAV,CAAa,sCAAb,EAAqD,YAAY;AAC7DiC;AACH,CAFD,E","file":"com-ga-tracking.js","sourcesContent":["let $ = require(\"jquery\");\r\nlet $document = $(document);\r\nlet Logger = require(\"utils/log-utils\");\r\nconst langIdSuffix = window.location.href.indexOf('/fr/') > -1 ? \"-fr\" : \"-en\";\r\n\r\nString.prototype.replaceAll = function (search, replacement) {\r\n var target = this;\r\n return target.replace(new RegExp(search, 'g'), replacement);\r\n};\r\n\r\nclass GaTracker {\r\n constructor(pSource, pEventName, pItems) {\r\n this.source = pSource;\r\n this.eventName = pEventName;\r\n this.items = pItems;\r\n }\r\n\r\n track() {\r\n Logger.Log('GaTracker.' + this.source + '.' + this.eventName, this.items);\r\n\r\n try {\r\n // Ensure that Google Site Tag is added to site.\r\n gtag = gtag ||\r\n function (action, event, parameters) {\r\n Logger.Log('Google Global Site tag was not defined');\r\n };\r\n\r\n gtag('event', this.eventName, this.items);\r\n } catch (err) {\r\n Logger.Log('Google Global Site tag was not defined');\r\n }\r\n }\r\n}\r\n\r\nclass GaGenericErrorTracking {\r\n constructor() {\r\n }\r\n\r\n trackGenericError() {\r\n\r\n /**\r\n * Log any script error to Google Analytics.\r\n *\r\n * Third-party scripts without CORS will only provide \"Script Error.\" as an error message.\r\n *\r\n * @param {String} errorMessage Error message.\r\n * @param {String} url URL where error was raised.\r\n * @param {Number} lineNumber Line number where error was raised.\r\n * @param {Number|undefined} columnNumber Column number for the line where the error occurred.\r\n * @param {Object|undefined} errorObject Error Object.\r\n * @return {Boolean} When the function returns true, this prevents the\r\n * firing of the default event handler.\r\n */\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n //window.addEventListener('error', function (event) {\r\n //let message = event.message;\r\n //let source = event.filename;//event.source;\r\n //let lineno = event.lineno;\r\n //let colno = event.colno;\r\n //let error = event.error;\r\n\r\n try {\r\n // In case the \"errorObject\" is available, use its data, else fallback \r\n // on the default \"errorMessage\" provided:\r\n let exceptionDescription = message;\r\n if (typeof error !== 'undefined' && typeof error.message !== 'undefined') {\r\n exceptionDescription = error.message;\r\n }\r\n\r\n // Format the message to log to Analytics (might also use \"errorObject.stack\" if defined):\r\n exceptionDescription += ' @ ' + source + ':' + lineno + ':' + colno;\r\n\r\n Logger.Log('trackGenericError() is called', exceptionDescription);\r\n\r\n let errorTracker = new GaTracker('GaGenericErrorTracking',\r\n 'exception',\r\n {\r\n 'description': exceptionDescription,\r\n 'fatal': false\r\n });\r\n errorTracker.track();\r\n\r\n\r\n } catch (err) {\r\n Logger.Log(\"Erreur dans le loguage des erreurs.\", err);\r\n }\r\n\r\n\r\n return true;\r\n\r\n //});\r\n };\r\n\r\n }\r\n}\r\n\r\nclass GaCommonEecTracking {\r\n constructor() {\r\n }\r\n\r\n trackProductsContainersPrints($containers) {\r\n let instance = this;\r\n $containers.each(function () {\r\n instance.trackProductsContainerPrints($(this));\r\n });\r\n }\r\n\r\n trackProductsContainerPrints($container) {\r\n switch ($container.data(\"ga-eec-container\")) {\r\n case \"master-products-list\":\r\n this.trackViewItemList($('[data-ga-eec-type=\"view_item_list\"]', $container));\r\n this.trackProductClicks($('[data-ga-eec-type=\"view_item_list\"]', $container));\r\n break;\r\n case \"detail-item\":\r\n this.trackViewItem($('[data-ga-eec-type=\"view_item\"]', $container));\r\n break;\r\n case \"checkout\":\r\n this.trackCheckoutSteps($container.data('ga-eec-checkout-step'));\r\n this.trackCheckoutPurchase();\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Tracking de l'affichage des IMasterProduct\r\n * @param {Array} $viewItems : Array Of view_item_list\r\n */\r\n trackViewItemList($viewItems) {\r\n\r\n let trackItems = [];\r\n $viewItems.each(function () {\r\n let $viewItemList = $(this);\r\n let listPosition = parseInt($viewItemList.data('ga-eec-list-position'));\r\n if (isNaN(listPosition))\r\n listPosition = 0;\r\n listPosition++;\r\n let qty = parseInt($viewItemList.data('ga-eec-quantity'));\r\n if (isNaN(qty))\r\n qty = 1;\r\n let price = parseFloat($viewItemList.data('ga-eec-price'));\r\n if (isNaN(price))\r\n price = 0.0;\r\n let trackItem = {\r\n \"id\": ($viewItemList.data('ga-eec-id') || '') + langIdSuffix,\r\n \"name\": ($viewItemList.data('ga-eec-name') || '').replaceAll(' – ', ' / '),\r\n \"list\": $viewItemList.data('ga-eec-list') || '',\r\n \"brand\": $viewItemList.data('ga-eec-brand') || '',\r\n \"category\": $viewItemList.data('ga-eec-category') || '',\r\n \"variant\": $viewItemList.data('ga-eec-variant') || '',\r\n \"list_position\": listPosition,\r\n \"quantity\": qty,\r\n \"price\": price\r\n };\r\n trackItems.push(trackItem);\r\n });\r\n\r\n let tracker = new GaTracker('trackViewItemList', 'view_item_list', {\"items\": trackItems});\r\n tracker.track();\r\n }\r\n\r\n /**\r\n * Tracking de l'affichage des IProduct\r\n * @param {view_item} $viewItem : view_item element\r\n */\r\n trackViewItem($viewItem) {\r\n\r\n let trackItems = [];\r\n $viewItem.each(function () {\r\n let $viewItemList = $(this);\r\n let listPosition = parseInt($viewItemList.data('ga-eec-list-position'));\r\n if (isNaN(listPosition))\r\n listPosition = 0;\r\n listPosition++;\r\n let qty = parseInt($viewItemList.data('ga-eec-quantity'));\r\n if (isNaN(qty))\r\n qty = 1;\r\n let price = parseFloat($viewItemList.data('ga-eec-price'));\r\n if (isNaN(price))\r\n price = 0.0;\r\n let trackItem = {\r\n \"id\": ($viewItemList.data('ga-eec-id') || '') + langIdSuffix,\r\n \"name\": ($viewItemList.data('ga-eec-name') || '').replaceAll(' – ', ' / '),\r\n \"list_name\": $viewItemList.data('ga-eec-list-name') || '',\r\n \"brand\": $viewItemList.data('ga-eec-brand') || '',\r\n \"category\": $viewItemList.data('ga-eec-category') || '',\r\n \"variant\": $viewItemList.data('ga-eec-variant') || '',\r\n \"list_position\": listPosition,\r\n \"quantity\": qty,\r\n \"price\": price\r\n };\r\n trackItems.push(trackItem);\r\n });\r\n\r\n let tracker = new GaTracker('trackViewItem', 'view_item', {\"items\": trackItems});\r\n tracker.track();\r\n }\r\n\r\n /**\r\n * Tracking du click sur les IMasterProduct\r\n * @param {Array} $viewItems : Array Of view_item_list\r\n */\r\n trackProductClicks($viewItems) {\r\n\r\n $viewItems.off('click.GaCommonEecTracking');\r\n $viewItems.on('click.GaCommonEecTracking', function (e) {\r\n let trackItems = [];\r\n let $viewItemList = $(this);\r\n let listPosition = parseInt($viewItemList.data('ga-eec-list-position'));\r\n if (isNaN(listPosition))\r\n listPosition = 0;\r\n listPosition++;\r\n let qty = parseInt($viewItemList.data('ga-eec-quantity'));\r\n if (isNaN(qty))\r\n qty = 1;\r\n let price = parseFloat($viewItemList.data('ga-eec-price'));\r\n if (isNaN(price))\r\n price = 0.0;\r\n let trackItem = {\r\n \"id\": ($viewItemList.data('ga-eec-id') || '') + langIdSuffix,\r\n \"name\": ($viewItemList.data('ga-eec-name') || '').replaceAll(' – ', ' / '),\r\n \"list\": $viewItemList.data('ga-eec-list') || '',\r\n \"brand\": $viewItemList.data('ga-eec-brand') || '',\r\n \"category\": $viewItemList.data('ga-eec-category') || '',\r\n \"variant\": $viewItemList.data('ga-eec-variant') || '',\r\n \"list_position\": listPosition,\r\n \"quantity\": qty,\r\n \"price\": price\r\n };\r\n\r\n trackItems.push(trackItem);\r\n\r\n let tracker = new GaTracker('trackProductClicks', 'select_content', {\"items\": trackItems});\r\n tracker.track();\r\n\r\n });\r\n }\r\n\r\n /**\r\n * Tracking de l'affichage des étapes du chekout\r\n */\r\n trackCheckoutSteps(step) {\r\n\r\n let $itemsContainer = $('[data-ga-eec-container=\"checkout-items\"]');\r\n let $items = $('[data-ga-eec-type=\"shoppingcart_item\"]', $itemsContainer);\r\n let trackItems = [];\r\n\r\n $items.each(function () {\r\n\r\n let $item = $(this);\r\n let qty = parseInt($item.data('ga-eec-quantity'));\r\n if (isNaN(qty))\r\n qty = 1;\r\n let price = parseFloat($item.data('ga-eec-price'));\r\n if (isNaN(price))\r\n price = 0.0;\r\n let trackItem = {\r\n \"id\": ($item.data('ga-eec-id') || '') + langIdSuffix,\r\n \"name\": ($item.data('ga-eec-name') || '').replaceAll(' – ', ' / '),\r\n \"brand\": $item.data('ga-eec-brand') || '',\r\n \"category\": $item.data('ga-eec-category') || '',\r\n \"variant\": $item.data('ga-eec-variant') || '',\r\n \"quantity\": qty,\r\n \"price\": price\r\n };\r\n trackItems.push(trackItem);\r\n });\r\n\r\n let eventName = '';\r\n switch (step + '') {\r\n case \"1\":\r\n eventName = 'begin_checkout';\r\n break;\r\n case \"x-error\":\r\n eventName = 'exception';\r\n break;\r\n default:\r\n eventName = 'checkout_progress';\r\n break;\r\n }\r\n\r\n let items = {\r\n \"items\": trackItems\r\n //,\"coupon\": \"SUMMER_DISCOUNT\",\r\n };\r\n\r\n if (!isNaN(step) && parseInt(step) > 1) {\r\n items.checkout_step = parseInt(step);\r\n }\r\n\r\n let tracker = new GaTracker('trackCheckout', eventName, items);\r\n tracker.track();\r\n }\r\n\r\n /**\r\n * Tracking de l'achat.\r\n */\r\n trackCheckoutPurchase() {\r\n\r\n let $itemsContainer = $('[data-ga-eec-container=\"checkout-items\"]');\r\n let $amountsContainer = $('[data-ga-eec-container=\"checkout-amounts\"]');\r\n\r\n if ($amountsContainer.data(\"is-purchase\") != \"1\") // let \"!=\" do not replace by \"!==\"\r\n return;\r\n\r\n let $items = $('[data-ga-eec-type=\"shoppingcart_item\"]', $itemsContainer);\r\n let trackItems = [];\r\n\r\n $items.each(function () {\r\n\r\n let $item = $(this);\r\n let qty = parseInt($item.data('ga-eec-quantity'));\r\n if (isNaN(qty))\r\n qty = 1;\r\n let price = parseFloat($item.data('ga-eec-price'));\r\n if (isNaN(price))\r\n price = 0.0;\r\n let trackItem = {\r\n \"id\": ($item.data('ga-eec-id') || '') + langIdSuffix,\r\n \"name\": ($item.data('ga-eec-name') || '').replaceAll(' – ', ' / '),\r\n \"brand\": $item.data('ga-eec-brand') || '',\r\n \"category\": $item.data('ga-eec-category') || '',\r\n \"variant\": $item.data('ga-eec-variant') || '',\r\n \"quantity\": qty,\r\n \"price\": price\r\n };\r\n trackItems.push(trackItem);\r\n });\r\n\r\n //$amountsContainer\r\n let items = {\r\n \"transaction_id\": $amountsContainer.data('ga-ecc-transaction-id'),\r\n \"value\": $amountsContainer.data('ga-ecc-value'),\r\n \"tax\": $amountsContainer.data('ga-ecc-tax'),\r\n \"shipping\": $amountsContainer.data('ga-ecc-shipping'),\r\n \"currency\": $amountsContainer.data('ga-ecc-currency'),\r\n \"items\": trackItems\r\n };\r\n\r\n let tracker = new GaTracker('trackCheckout', 'purchase', items);\r\n tracker.track();\r\n }\r\n\r\n bindOverlayTrackingEvents() {\r\n\r\n let instance = this;\r\n\r\n $document.off('overlayTicketMasterProductOverlayOpened.GaCommonEecTracking');\r\n $document.on('overlayTicketMasterProductOverlayOpened.GaCommonEecTracking', function (event, overlayId) {\r\n let $overlayContainer = $('[data-overlay=\"' + overlayId + '\"]');\r\n if (!$overlayContainer)\r\n return;\r\n\r\n instance.trackOverlayProduct($('[data-ga-eec-type=\"view_item\"]', $overlayContainer));\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Tracking de l'affichage des IProduct\r\n * @param {view_item} $viewItem : view_item element\r\n */\r\n trackOverlayProduct($viewItem) {\r\n\r\n let trackItems = [];\r\n $viewItem.each(function () {\r\n let $viewItemList = $(this);\r\n let listPosition = parseInt($viewItemList.data('ga-eec-list-position'));\r\n if (isNaN(listPosition))\r\n listPosition = 0;\r\n listPosition++;\r\n let qty = parseInt($viewItemList.data('ga-eec-quantity'));\r\n if (isNaN(qty))\r\n qty = 1;\r\n let price = parseFloat($viewItemList.data('ga-eec-price'));\r\n if (isNaN(price))\r\n price = 0.0;\r\n let trackItem = {\r\n \"id\": ($viewItemList.data('ga-eec-id') || '') + langIdSuffix,\r\n \"name\": ($viewItemList.data('ga-eec-name') || '').replaceAll(' – ', ' / '),\r\n \"list_name\": $viewItemList.data('ga-eec-list-name') || '',\r\n \"brand\": $viewItemList.data('ga-eec-brand') || '',\r\n \"category\": $viewItemList.data('ga-eec-category') || '',\r\n \"variant\": $viewItemList.data('ga-eec-variant') || '',\r\n \"list_position\": listPosition,\r\n \"quantity\": qty,\r\n \"price\": price\r\n };\r\n trackItems.push(trackItem);\r\n });\r\n\r\n let tracker = new GaTracker('trackViewItem', 'view_item', {\"items\": trackItems});\r\n tracker.track();\r\n }\r\n\r\n bindShoppingCartTrackingEvents() {\r\n\r\n let instance = this;\r\n\r\n $document.off('shoppingCartAction.GaCommonEecTracking');\r\n $document.on('shoppingCartAction.GaCommonEecTracking', function (event, lastActions, AppliedActions) {\r\n instance.trackShoppingCartActions(AppliedActions);\r\n });\r\n\r\n }\r\n\r\n trackShoppingCartActions(AppliedActions) {\r\n\r\n if (!AppliedActions)\r\n return;\r\n\r\n for (let i = 0; i < AppliedActions.length; i++) {\r\n let appliedAction = AppliedActions[i];\r\n\r\n switch (appliedAction.ActionType) {\r\n case \"Add\":\r\n this.trackAddItemAction(appliedAction.ProductId, appliedAction.ProductCategory, appliedAction.ProductName, appliedAction.ProductTitle, appliedAction.AppAlias, appliedAction.ProductPrice, appliedAction.Quantity);\r\n break;\r\n case \"Remove\":\r\n this.trackRemoveItemAction(appliedAction.ProductId, appliedAction.ProductCategory, appliedAction.ProductName, appliedAction.ProductTitle, appliedAction.AppAlias, appliedAction.ProductPrice, appliedAction.Quantity);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n trackAddItemAction(productId, productCategory, productName, productVariant, brand, price, qty) {\r\n this.trackAction('add_to_cart', productId, productCategory, productName, productVariant, brand, price, qty);\r\n }\r\n\r\n trackRemoveItemAction(productId, productCategory, productName, productVariant, brand, price, qty) {\r\n this.trackAction('remove_from_cart', productId, productCategory, productName, productVariant, brand, price, qty);\r\n }\r\n\r\n trackAction(action, productId, productCategory, productName, productVariant, brand, price, qty) {\r\n if ((productName + productVariant).length === 0 && (productCategory + '').length > 0) {\r\n productName = productCategory;\r\n } else if ((productName + '').length === 0) {\r\n productName = productVariant;\r\n }\r\n if (productName == productVariant)\r\n productVariant = '';\r\n\r\n let trackItems = [];\r\n let trackItem = {\r\n \"id\": productId + langIdSuffix,\r\n \"name\": productName.replaceAll(' – ', ' / '),\r\n \"quantity\": qty,\r\n \"brand\": brand,\r\n \"category\": productCategory,\r\n \"variant\": productVariant,\r\n \"price\": price\r\n };\r\n trackItems.push(trackItem);\r\n\r\n let tracker = new GaTracker('trackAction', action, {\"items\": trackItems});\r\n tracker.track();\r\n }\r\n\r\n}\r\n\r\nlet init = function () {\r\n\r\n let gaGenericErrorTrackingInstance = new GaGenericErrorTracking();\r\n gaGenericErrorTrackingInstance.trackGenericError();\r\n\r\n let gaCommonEecTrackingInstance = new GaCommonEecTracking();\r\n gaCommonEecTrackingInstance.trackProductsContainersPrints($('[data-ga-eec-container]'));\r\n gaCommonEecTrackingInstance.bindOverlayTrackingEvents();\r\n gaCommonEecTrackingInstance.bindShoppingCartTrackingEvents();\r\n}\r\n\r\ninit();\r\n\r\n$document.off('jsInitAllScripts.GaCommonEecTracking');\r\n$document.on('jsInitAllScripts.GaCommonEecTracking', function () {\r\n init();\r\n});\n\n\n// WEBPACK FOOTER //\n// ./LeLab.Gcv.Web/src/common/com-ga-tracking/com-ga-tracking.chunk.js"],"sourceRoot":""}