1(function ($, Drupal, drupalSettings) { 2 const path = window.location.pathname; 3 4 //job details 5 $('.job-offer--teaser .btn-job').on('click',function(){ 6 dataLayer.push({ 7 'event': 'job-details', 8 'job title': $(this).parent().parent().find('.job-offer__title').text().trim() 9 }); 10 }); 11 $('.job-offer__content .job-offer__title a').on('click',function(){ 12 dataLayer.push({ 13 'event': 'job-details', 14 'job title': $(this).text().trim() 15 }); 16 }); 17 $('article.job-offer.job-offer--teaser .job-offer__thumbnail a').on('click',function(){ 18 dataLayer.push({ 19 'event': 'job-details', 20 'job title': jQuery('.job-offer__content .btn-job').parent().parent().find('.job-offer__title').text().trim() 21 }); 22 }); 23 //contact send 24 if (path.includes('/contact') || path.includes('/kontakt')) { 25 if ($('form').length){ 26 dataLayer.push({ 27 'custom_context_contact':'contact' 28 }); 29 $('form').on('click',function(){ 30 dataLayer.push({ 31 'event': 'contact-company', 32 }); 33 }); 34 } 35 //foundation 36 if (path.includes('/the-babilou-family-foundation')) { 37 dataLayer.push({ 38 'custom_context_foundation':'foundation' 39 }); 40 $('a[href^="mailto:"]').on('click',function(){ 41 dataLayer.push({ 42 'event': 'custom-<foundation>', 43 }); 44 }); 45 } 46 } 47 48 //job apply + job form 49 if ($('input[id^="edit-cv"]').parents('form').length){ 50 var job_title = ""; 51 if ($('.job-offer__title').length) { 52 job_title = $('.job-offer__title').text().trim(); 53 } 54 dataLayer.push({ 55 'event' : 'jobs-application-form', 56 'job title' : job_title 57 }) 58 $('.webform-button--submit').on('click',function() { 59 dataLayer.push({ 60 'event' : 'jobs-application-confirmation', 61 'job title' : job_title 62 }) 63 }); 64 } 65 66 if (path.includes('/locations-brands')) { 67 dataLayer.push({ 68 'custom_context_partner':'partner' 69 }); 70 } 71 72 73 74})(jQuery, Drupal, drupalSettings); 75 76
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.