[HELP PLEASE] Facebook Dynamic Ads configuration

Highlighted
Shopify Partner
2 0 1

Hi there!
I'm trying to install the ViewContent and AddToCart code right in my product.liquid html for Dynamic Product Ads on Facebook. I have a problem with the capture of the content_ids.
I wrote the code:

fbq('track', 'ViewContent', {
   content_ids: ['shopify_{{ product.id }}_{{ product.variants.first.id }}'],
   content_type: 'product'
});

The question is that I need to save the variable with this structure: shopify_<PRODUCTID>_<VARIANTID>. This is because I'm using the Facebook Product Feed (Flexify) and it creates the feed with this structure.

But in the moment I'm testing the pixel with Facebook Pixel Helper the Content_ids is only the product.ids number... e.g.: 391278212 , instead of the whole string e.g.: shopify_391278212_10711534725

Can you help me please?

Thanks!

Javier

0 Likes
Highlighted
Shopify Staff
Shopify Staff
500 1 56

Hi Javier,

Thanks for your post! 

This doc might help you add the correct variables to your pixel! It looks like you need to use product_id and perhaps variant_id rather than product.id for your pixel to get the right information, is that the way you had formatted it there?

Warm regards,

Anne

 

0 Likes
Highlighted
Shopify Partner
61 2 12

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
Shopify Digital Marketing Blog: business.czarto.com
1 Like