window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-B3TQXW26FE', { 'anonymize_ip': true }); gtag('config', 'AW-405739336', { 'anonymize_ip': true }); function gtag_report_conversion_devis(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-405739336/ji8eCN_CvPoBEMiuvMEB', 'event_callback': callback }); return false; } function gtag_report_conversion_contact(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-405739336/3M4MCNe6vPoBEMiuvMEB', 'event_callback': callback }); return false; } function gtag_report_conversion_tel(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-405739336/v6VpCNv58_oBEMiuvMEB', 'event_callback': callback }); return false; } jQuery(document).on('gform_confirmation_loaded', function(event, formId){ if (formId == 1) { console.log('conversion_devis'); gtag_report_conversion_devis(); } }); jQuery(document).on('click', '.btTelThermoz', function(event){ //console.log('conversion_tel'); gtag_report_conversion_tel(); }); document.addEventListener( 'wpcf7mailsent', function( event ) { if ( '28918' == event.detail.contactFormId ) { //console.log('conversion_contact'); gtag_report_conversion_contact(); } }, false );

Uncategorized