document.addEventListener("wpcf7mailsent",function(e){var n=window.gtmkit_settings.datalayer_name,e={formId:e.detail.contactFormId,response:e.detail.inputs};window.gtmkit.events.push(Object.assign({event:"gtmkit.CF7MailSent"},e),n);let a=window.gtmkitCf7Engagement||{};if(a.generateLeadEnabled){let t=Object.assign({event:"generate_lead"},e);a.payload&&"object"==typeof a.payload&&Object.keys(a.payload).forEach(function(e){t[e]=a.payload[e]}),window.gtmkit.events.push(t,n)}});