Je compose mon projet pour le réaliser moi-même | Mon-interrupteur.fr /* */ // var dataLayer = window.dataLayer = window.dataLayer || []; (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-MQP43DV'); $('body').click(function(e){ if( $('#nav-panel').hasClass('open') ){ e.stopPropagation(); $('header .grid-container .nav .transformico-btn').toggleClass('close'); $('#nav-panel').toggleClass('open'); return false; } }) $('header .grid-container #nav-panel').click(function(e){ e.stopPropagation(); }) $('header .grid-container .nav').click(function(e){ e.stopPropagation(); $(this).find('.transformico-btn').toggleClass('close'); $('#nav-panel').toggleClass('open'); return false; }); // DÉFINITION DES GAMMES MYS.CONFIG.doigts = {"celiane":["titane","blanc","graphite"],"dooxie":["blanc","alu","noir"],"altege":["neige","nuage","nuit"]}; // DONNÉES REVENDEUR => Données des produits accessibles MYS.CONFIG.URLS.DB_produits.url = "/action/PRODUITS/get.php?contour=gsb"; // MAPPAGE DU FICHIER JSON DES PRODUITS MYS.CONFIG.MAPPAGE.DB_produits = {"id":"id","id_reseller":"sku","name":"name","prix":"price","ean":"gencod"}; // TEMPLATE JS if (MYS.CONFIG.URLS.templates) { MYS.CONFIG.URLS.templates.url = "/static/2/js/templates/gsb.html?t=1570538702"; } MYS.CONFIG.cart = {"pdfAction":true} /* @todo A METTRE DANS LA CONFIGURATION DES CONTEXTES */ MYS.CONFIG.themePrimaryColor = [248, 134, 64]; MYS.CONFIG.themeTransitionColor = [230, 85, 106]; MYS.CONFIG.displayElectricienButton = false; MYS.CONFIG.pdfTheme = 'gsb'; MYS.CONFIG.contour = 'gsb'; MYS.CONFIG.pdfUrlPath = '/action/PDF/distributor/selection/'; MYS.CONFIG.URLS.DB_produits.url = '/action/PRODUITS/get.php?contour=gsb'; MYS.CONFIG.DATABASE.altege.fonctions = ['/static/2/database/db/fonctions/altege_gsb.json']; MYS.CONFIG.DATABASE.altege.finitions = ['/static/2/database/db/finitions/altege_gsb.json']; MYS.CONFIG.DATABASE.altege.plaques = ['/static/2/database/db/plaques/altege_gsb.json']; MYS.CONFIG.DATABASE.celiane.fonctions = ['/static/2/database/db/fonctions/celiane_gsb.json']; MYS.CONFIG.DATABASE.celiane.finitions = ['/static/2/database/db/finitions/celiane_gsb.json']; MYS.CONFIG.DATABASE.celiane.plaques = ['/static/2/database/db/plaques/celiane_gsb.json']; MYS.CONFIG.DATABASE.dooxie.fonctions = ['/static/2/database/db/fonctions/dooxie_gsb.json']; MYS.CONFIG.DATABASE.dooxie.finitions = ['/static/2/database/db/finitions/dooxie_gsb.json']; MYS.CONFIG.DATABASE.dooxie.plaques = ['/static/2/database/db/plaques/dooxie_gsb.json']; MYS.CONFIG.URLS.LIST_fonctionsCategories.url = '/static/2/database/list/list_fonctionsCategories_gsb.min.json' MYS.CONFIG.themeLeftContainerWidth = 55; MYS.CONFIG.themeLeftContainerLimit = 1024; MYS.CONFIG.themeRightContainerWidth = false; MYS.CONFIG.themeRightContainerLimit = false; MYS.CONFIG.themeAvailableLegrandLogo = true; $(document).ready(function() { if (navigator.userAgent.match(/iPad;.*CPU.*OS 7_\d/i)) { $('body, .content').height(window.innerHeight); window.scrollTo(0, 0); $('html').addClass('ipad ios7'); } MYS.construct(); }) // PDF LOCATION MYS.CONFIG.ACTION = {}; MYS.CONFIG.ACTION.PDF_one = window.location.origin + '/action/PDF/distributor/one/'; // APP LEADFORMANCE MYS.KEYS.LEADFORMANCE = "REVO0PBsUSVsoP3ZgtuisXRNTny68vPUHIAr4SZoPCj8Zx7r"; let reseller_name = "mon-interrupteur"; let gtmDatas = { 'page_category': 'configurator', 'page_name': document.title, 'clientType': reseller_name }; gtmDatas['typeEnv'] = 'desktop'; gtmDatas['typeEnv'] = 'mobile'; dataLayer.push(gtmDatas);