handleJukeboxDispatchedEvents = function (event) { switch (event.detail.eventName) { case "submit_external_form": ga("send", "event", "forms", "submit", "PathFactory"); window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: "pathFactoryFormSubmit", }); } }; /* GA4 Client ID for Marketo Forms | page.gitlab.com. Added by Mihai Conteanu 2024-07-01. */ MktoForms2.whenReady(function (form) { if (typeof gtag !== 'undefined') { gtag('get', 'G-ENFH3X7M5Y', 'client_id', function(clientId) { document.getElementsByName('GACLIENTID__c')[0].value = clientId; }); var trackingId = 'G-ENFH3X7M5Y'; document.getElementsByName('GATRACKID__c')[0].value = trackingId; } }); /* End GA4 Client ID for Marketo Forms */ window.addEventListener("pf_event", this.handleJukeboxDispatchedEvents, false);