Does anyone know how to track Facebook lead events when a Klaviyo form us successfully submitted?
I have a Shopify store and I’m running lead campaigns. I’d like to track and optimise for leads.
I’ve added the following code however when using the event testing tool on Facebook it’s not showing. I know I can set it up with the Facebook tool but this only fires when they click the button and not the successful submission!
<script>
window.addEventListener("klaviyoForms", function(e) {
if (e.detail.type == 'submit') {
/// FACEBOOK PIXEL ID
}
});
</script>
Thank you!!