I’m wondering if you can help me out with a Datalayer related query to do with Facebook.
I set up a new variable to pass my product id’s (eccom_prodid) to my Facebook tags for events such as AddToCart; Purchase etc. Everything works fine if there is only one product id in the cart but as soon as there is more than 1 I get a “can’t match products” error in the FB pixel checker. When I looked into the issue further in FB business manager they are flagging a formatting issue as follows:
When multiple product id’s are passed in the tag the format being passed to FB looks like this:
Facebook is asking for the following format with each individual id wrapped in single quotes:
Is there a way to format the ecomm_prodid in the Datalayer as outlined by FB or set up an alternative version that is formatted as above? Alternatively is there a way to achieve the same thing by formatting the variable in GTM?
Appreciate any steer you can provide.
Kind Regards, Charles