problem with my facbook pixel

Highlighted
New Member
1 0 0

hello 

this massage i get from facebook all the time

 

Your ad will not be optimized for cart because we haven't received any activity from your pixel.

in chat with shopify the tell me that my pixel is in the write place so what u think is the problem?

 

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
400 0 68

Hi Laura,

Britton here with the Shopify support team.

I've done some digging into the Facebook documentation on tracking pixels and I think I can see a potential issue with the way that your pixel code is set up. To start with, your standard event (fbq('track', 'InitiateCheckout');) is listed first in your code: https://screenshot.click/10-23-7lewd_kt1rv.jpg.

In the Facebook documentation, the standard event code is always listed after this code block: 

fbq('init', '102564583471839');
fbq('track', "PageView");

You can see an example of a correctly set up code snippet here: https://screenshot.click/10-25-1if6r_5716l.jpg.

Also, I can see that you are using the 'InitiateCheckout' standard event. This event is meant to be used "When a person enters the checkout flow prior to completing the checkout flow, e.g. click on checkout button". You currently have your pixel enabled on your homepage though, which makes me think that it is added to theme.liquid. If you are just wanting to track when people go to your homepage you are better off replacing the 'InitiateCheckout' standard event with one like the 'ViewContent' standard event. If you are wanting to use 'InitiateCheckout', cart.liquid may be a better place for this tracking code.

I hope this helps you sort out your data woes!

-Britton

Britton Shopify Guru
0 Likes