My pixel is installed and seems to be working correctly. I used the event setup tool and it worked fine as well.. except that when I navigate to the checkout from the cart, the setup tool disappears so I'm not able to add a purchase event. If I navigate back to the cart, it reappears.
Anyone else experience this?
Any suggestions on what I can do to get the purchase event set up?
Thanks in advance
After several painful hours, I have found a fix to this!
Go to Shopify > Setting > Checkout and paste the facebook pixel code into the Additional scripts box.
Hit save, and then when you go back to the checkout page, you should see the facebook event setup tool box does not disappear anymore.
Good luck!
No luck bro,
I put the FB pixel code in the additional scripts box but after refreshing no luck.
I even tried it on 2 other browsers but still nothing.
And to just be clear what script I added:
<!-- Facebook Pixel Code -->
<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', '115642807035374');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=115642807035374&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
I had been struggling with this for many many many days and I have just managed to get it to work for me. I had been doing exactly the same thing however what worked for me is adding the missing opening and closing head tags into the additional scripts box. My base pixel code is installed into my theme code using the same code as yourself (with my own pixel ID ofc) and in additional scripts I just added <head> above the pixel code and </head> beneath the code.
If you want to track a purchase then I would recommend adding the fbq('track','Purchase'); beneath the page view track.
Hope this helps
User | Count |
---|---|
11 | |
8 | |
7 | |
7 | |
6 |