Hi there, I've read everywhere and I'm really unsure how to set this up.
I have already installed my Pixel through the Facebook and Instagram Sales Channel App on Shopify. I have ran campaigns before on Facebook and all has worked well.
I am trying to run a campaign to optimise for Klaviyo sign ups and therefore would like to use my pixel to track the sign ups submissions on site.
To do this I have added my pixel code to theme.liquid in the header section:
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue==];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e))0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '335819078856330');
fbq('track', 'PageView');
</script>
<noscript
><img
height="1"
width="1"
style="display:none"
src="https://www.facebook.com/tr?id=335819078856330&ev=PageView&noscript=1"
></noscript>
Which I'm not sure why I should have to be honest if the pixel has already been set up through the app.
I also added the Klaviyo call code at the bottom of my theme.liquid file
</script>
{% endif %}
<script>
window.addEventListener("klaviyoForms", function(e) {
if (e.detail.type == 'submit') {
fbq('track', 'Lead');
}
});
</script>
This I am sure would track every submit event and call it Lead to the Pixel.
Now running test data - it hasn't captured a single lead. In my Meta dashboard, the standard event of Lead isn't even appearing.
I am so confused, and unsure what to do.
Please help!
Thanks in advance.