1(function () { 2 'use strict'; 3 4 // HubSpot's embedded forms post a message on submit; there's no other 5 // hook available since the form itself lives inside an iframe. 6 window.addEventListener('message', function (event) { 7 if (event.data && event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmitted') { 8 if (typeof gtag === 'function') { 9 gtag('event', 'form_submit', { 10 form_id: event.data.id || '', 11 form_type: 'hubspot' 12 }); 13 } 14 } 15 }); 16})();
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.