segment-integrations / analytics.js-integration-facebook-pixel

The Facebook Pixel analytics.js integration. https://segment.com/docs/integrations/facebook-pixel
MIT License
8 stars 16 forks source link

fix(productListViewed): map productIds to content_ids param #39

Closed ccnixon closed 6 years ago

ccnixon commented 6 years ago

Previously we were mapping the product list category as the only member of an array to the FB pixel content_ids param. FB expects this to be an array of productIds instead. This PR adds a change to first check if the user has sent through a products array with productIds and if so, properly maps them to the content_ids array. Otherwise, it simply falls back on the legacy behavior.

https://segment.atlassian.net/browse/PLATFORM-2400