1(function (Drupal, once, $) { 2 3 'use strict'; 4 5 Drupal.behaviors.algecoGTMAgency = { 6 attach: function (context) { 7 window.dataLayer = window.dataLayer || []; 8 9 once('callbackMobile', '.node--type-agency', context) 10 .forEach(function (agency) { 11 12 $(agency).find('.btn-phone, .phone-number').click(() => { 13 window.dataLayer.push({ 14 'event': 'callbackMobile', 15 'eventCategory': 'Agences', 16 'eventAction': 'Appel mobile', 17 'agency_name': $(agency).find('.field--name-title')[0]?.innerText 18 }); 19 }); 20 21 $(agency).find('.btn-marker').click(() => { 22 window.dataLayer.push({ 23 'event': 'rechercheRoute', 24 'eventCategory': 'Agences', 25 'eventAction': 'Recherche route', 26 'agency_name': $(agency).find('.field--name-title')[0]?.innerText 27 }); 28 }); 29 }); 30 } 31 }; 32 33})(Drupal, once, jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.