Problem with Facebook Pixel and Products Variants

Highlighted
Tourist
7 0 1

Hello, I have a problem with my shopify store and facebook pixel.
The pixel works fine, but when I select a variant it just dissapears!

This also happens to the store of a friend of mine:
For example https://geekiemania.com/collections/frontpage/products/glow-in-the-dark-caps-geekie-exclusive
If you select a variant the chrome extension will not detect the pixel.

How can I fix that?

1 Like
Shopify Staff
Shopify Staff
127 0 7

Hey there,

There was an update to the Facebook pixel code a few weeks ago, and now you do just need to put in the pixel ID in your Settings for the Online Store.

I have this excerpt from our Facebook Pixel guide in regards to the product variant:

"Integrating Facebook Pixel in your admin doesn't support Dynamic Product Ads (DPA). If you have Dynamic Product Ads through Facebook on your store which required additional code snippets embedded on your store's pages, then continue to use your existing implementation instead. The current integration does not pass the product variant ID which is required for DPA."

To correct the issue, you do have a couple options.

1.) You can use an app to help manually feed the variants to Facebook, such as Facebook Product Feed to sync all that up easily.

or

2.) You can manually update your Product Catalog with Facebook - more information can be found here.

That will do the trick for you! 

Justin L

0 Likes
Tourist
7 0 1

Hello Justin,  thanks for your response.

I have my pixel installed with the new method,but im not using dynamic product Ads. 

What should I do? I only want the pixel to work with variants,  i don't need dynamic product Ads right now.

0 Likes
Tourist
7 0 1

Any other solutions? :)

0 Likes
Tourist
7 0 1

Is there any way I can solve this problem?

0 Likes
Tourist
7 0 1

I guess I can't use fb pixel :( 

0 Likes
Shopify Partner
51 1 4

Whith the new pixel code, if you hit the product page without a variant specified, Shopify will fire the pixel with the ProductId to Facebook. If a particular variant is selected, then Shopify will fire the pixel code with the VariantId to Facebook. So when uploading your product catalog to facebook, you have to make sure that you include all your productIds AND all your variant Ids in the feed.

For anyone that wants to know how to create your own custom Facebook product feed, here is a brief writeup on how to do so using a custom collection template:

https://business.czarto.com/2016/11/22/shopify-diy-facebook-product-feed/

Best,

Alex

Digital Marketing @ Manitobah.ca | Pendleton.ca | Aigle.ca
1 Like
Tourist
32 0 2

I have Shopify's native Facebook Pixel integration installed but when I land on a variant page the variant ID is not showing up in the Facebook Pixel Helper's info

Any clue on why this is the case?

www.cafevagrant.com - Web Design & Marketing Strategy
1 Like
Tourist
32 0 2

I have more evidence that it is not attributing the Pixel event to the variant and only to the group. This is from the Events section in Facebook

www.cafevagrant.com - Web Design & Marketing Strategy
1 Like
Shopify Partner
51 1 4

@cafevagrant is correct -- Currently Shopify only fires the pixel with the product_group / product.id and NOT with the product / variant.id.

What you **could** do is fire another facebook event on your product page like so:

<!-- Custom Facebook Product Page Tracking Code -->
<script type="text/javascript">
 
  $( document ).ready(function() {
  
    fbq('track', 'ViewContent', {
    	content_name: '{{ product.title }}',
      	content_category: '{{ product.type }}',
  		value: {{ product.price | money_without_currency  | remove: ','  }},
      	currency: '{{ shop.currency }}',
      	content_ids: [{{ product.selected_or_first_available_variant.id }}],
      	content_type: 'product'
    });
    
    // Attache add to cart event
    $( '#AddToCart' ).click(function() {
      fbq('track', 'AddToCart', {
    	content_name: '{{ product.title }}',
      	content_category: '{{ product.type }}',
  		value: {{ product.price | money_without_currency  | remove: ','  }},
      	currency: '{{ shop.currency }}',
      	content_ids: [{{ product.selected_or_first_available_variant.id }}],
      	content_type: 'product'
      });
    });

  });
</script>

HOWEVER, I'm not sure if this is a good idea, as you will now have double the product views, and double the add to cart events, etc... Which may lead to double attribution, and double the conversion value being sent to your Facebook business manager:

But, on the positive side, your dynamic product remarketing should show the correct image / product variant, which should lead to better performance.

It will all come down to if Facebook is smart enough to figure out that the product_group + product are actually the same thing and dedublicate it.

Long term, I think that you either have to wait for Shopify to update their implementation, or to NOT use the default Shopify implementation and make your own custom implementation...

Alex

Digital Marketing @ Manitobah.ca | Pendleton.ca | Aigle.ca
0 Likes