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

"Product List Viewed" not writing product_ids to FB correctly #30

Open skyfallsin opened 7 years ago

skyfallsin commented 7 years ago

Ref: https://github.com/segment-integrations/analytics.js-integration-facebook-pixel/blob/master/lib/index.js#L134

The product_ids are not getting dispatched to FB properly, and instead the category is being sent.

Here's the spec on the FB side (Scroll down to View Category) https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/product-audiences/v2.8

liveink commented 7 years ago

The specific code example related to the above is:

fbq('track', 'ViewCategory', {
  content_name: 'Really Fast Running Shoes',
  content_category: 'Apparel & Accessories > Shoes',
  content_ids: ['1234', '2424', '1318', '6832'], // top 5-10 results
  content_type: 'product'
});
hankim813 commented 7 years ago

cc @sperand-io @jgershen

WesleyDRobinson commented 7 years ago

Perhaps updating Product List Viewed to trigger FB ViewCategory method is a good idea. At least, passing an array of product_ids for ViewContent content_ids seems more inline with FB spec than "category name."

While one particular guide is somewhat ambiguous, other definitions offered in Facebook docs for content_ids agree: "Product ids associated with the event. e.g. SKUs of products for AddToCart event: ['ABC123', 'XYZ789']"

mattmiddlesworth commented 6 years ago

This issue affects our implementation with Segment. Any progress on a fix?

jgershen commented 6 years ago

@calvinfo

calvinfo commented 6 years ago

Hey @mattmiddlesworth have you contacted us on our support page by any chance?

That is the fastest path to get this issue resolved! https://segment.com/help/contact

mattmiddlesworth commented 6 years ago

Hey @calvinfo we do have an open issue with segment. Just noticed this issue in github and wanted to show my support. Thanks!

JackieCabinet commented 6 years ago

@calvinfo Request #144468 is the support ticket we have for Segment 'Viewed Product List' mapping content_ids incorrectly to Facebook Pixel 'ViewContent'

theJoeBiz commented 6 years ago

Looks like this was fixed 14 days ago in https://github.com/segment-integrations/analytics.js-integration-facebook-pixel/commit/90c15b68709dac01b8396061bcfcd3795985ad7a, but my analytics.min.js still has the old version of the productListViewed function. When can we expect to see this deployed to production?

SegmentDestinationsBot commented 6 years ago

Hi @skyfallsin, as part of the monorepo migration, this issue has been moved to new issue. Our engineers have been notified and will prioritize and work on it ASAP. Thank you!

For more information, see README.md.