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:
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 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?
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: