Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

Facebook fetch contend ID, and not SKU!! #98

Closed
Styledmagento opened this issue Oct 10, 2018 · 3 comments
Closed

Facebook fetch contend ID, and not SKU!! #98

Styledmagento opened this issue Oct 10, 2018 · 3 comments

Comments

@Styledmagento
Copy link

Hi team,

I have a major issue with my Magento feed/ facebook remarketing.

My pixel is implemented so the content ID is fired by the SKU number. However, when I upload my feed to Facebook business manager, it fetches the Content ID number( Which is different from SKU ) and the pixel cannot match the traffic with the catalog because the Content ID and SKU dont match.

The weird thing is that in my magento feed, The Content ID number is nowhere to be found, I only make the feed with the SKU number, however it still fetches the false content ID number for some reason.

skaermbillede 2018-10-10 kl 17 46 29

skaermbillede 2018-10-10 kl 17 46 59

Where is it going wrong?

Thanks

@dmitridr
Copy link
Contributor

Hello,

Thank you for writing in.

The pixel installed by the plugin should be firing using the product number, and not the SKU.
The feed created by the plugin should be using the same product number.
So by default, these should match.

Judging by your screenshots, you are not using the pixel that has been installed by the plugin, but either a pixel installed by another plugin, or a self-installed pixel. Could you confirm that this is the case?

If this is so, you will need to use both the catalog and pixel created by the plugin to work.

If you are using the plugin only for feed, you may be able to modify the feed file to use the SKU with your self installed pixel as the content ID, I can show you where to make this change.

Hope that helps.

@coldnose
Copy link

coldnose commented Dec 4, 2018

Dmitri D, you are backwards on this issue. This is another problem with this Facebook Extension for Magento. Retailers will invariably use the SKU value for product identification. The Magento product ID is meaningful only to Magento. The pixel tracking data and feed created by the extension should use the SKU value for the FB product ID. My Google and Bing shopping feeds use SKU for product IDs.

I would like to change this in the tracking code used in the extension. Can you help speed this up for me by telling me the file and code to modify to fix it so the SKU is used in the feed and (more importantly) the tracking pixel?

Note: Even Facebook Support understands that the SKU is what retailers use for product ID. Here is a snippet from their Troubleshooting section:

"Make sure the product id in your feed matches the id that fires in your Facebook pixel: You'll need to make sure that your product SKUs match the product SKUs (or IDs) associated with your Facebook pixel to track people who show an interest in your products on your website."

@dmitridr
Copy link
Contributor

dmitridr commented Dec 4, 2018

@coldnose That's advice for manual installation, and it's good advice, but as long as the id fired from the pixel is the same as the id sent to the feed, re-targeting ads will work just fine. It happens that in the case of Magento, fetching the ID is faster and simpler than fetching SKU on the frontend, which is why we have done it this way.

See our official API documentation here:
https://developers.facebook.com/docs/facebook-pixel/reference/

content_ids : "Product IDs associated with the event, such as SKUs." (but not necessarily SKUs).

You are free to modify the plugin to use SKU, but it won't change much unless you have a separate self-installed pixel. You would have to change multiple locations to use SKU:

In the feed:
https://github.com/facebookincubator/facebook-for-magento/blob/v2.6.1/app/code/community/Facebook/AdsExtension/Model/FBProductFeed.php#L193

In the pixel you need to change all calls for product ids to calls for SKU. :
https://github.com/facebookincubator/facebook-for-magento/blob/v2.6.1/app/code/community/Facebook/AdsExtension/Block/ViewContent.php#L22
https://github.com/facebookincubator/facebook-for-magento/blob/v2.6.1/app/code/community/Facebook/AdsExtension/Block/Purchase.php
...and pretty much all the other files in that directory.

See also #95 where this is a requested advanced feature. I will close this one as a duplicate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants