woocommerce / facebook-for-woocommerce

A first-party extension plugin built for WooCommerce. Development is managed by Ventures.
https://woocommerce.com/products/facebook/
GNU General Public License v2.0
207 stars 136 forks source link

FB Event Manager diagnostics says "Same Event ID Received for Many Event Instances" #1722

Closed mburakkalkan closed 2 years ago

mburakkalkan commented 3 years ago

πŸ”Ž Isolate the bug

✍️ Describe the bug

Screenshot_1

Screenshot_2

Same Event ID Received for Many Event Instances

You're sending the same event ID for many instances of your Search events.
Event IDs are unique identifiers that are used to deduplicate identical events received
from your pixel and the Conversions API so they're not counted twice.
To ensure Facebook is accurately counting your events, each unique event instance
needs its own unique event ID. This may cause issues with the measurement of
your events and the attribution of your ad campaigns.

πŸšΆβ€β™€οΈ Steps to reproduce

I have done the regular setup, nothing different.

βœ”οΈ Expected behavior

No errors.

πŸ—ƒ Logs

NoticeCorp commented 3 years ago

We are seeing this too

ozancaglayan commented 3 years ago

same thing for AddToCart event

haszari commented 3 years ago

Is it possible this is caused by an interaction with another plugin, perhaps a caching / optimisation plugin such as WP Rocket? I saw this possibility mentioned in a support ticket. The pixel events are sent from the client (JS), so front-end caching could affect the events or maybe cause duplicate IDs.

If you're affected by this issue, can you please try disabling all other plugins to confirm the issue is not an interaction with another plugin? Thanks - I realise this is extra work for you and could be a hassle.

haszari commented 3 years ago

Note - we have passed this information on to Facebook for further investigation.

robertocyrino commented 3 years ago

3697868-zen

mburakkalkan commented 3 years ago

@haszari Finally I found the problem for myself. Using the both facebook for woocommerce and official facebook pixel plugin causes event duplications.

And frankly, until now, I didn't know the facebook for woocommerce already does all the jobs that official facebook pixels does. So I was using them both. I removed the official plugin then the problem solved.

But I think a warning or recommendation should be shown (after installation or somewhere in admin panel...) about not to use any other facebook pixel plugins while using Facebook for Woocommerce.

Thank you for your help!

haszari commented 3 years ago

But I think a warning or recommendation should be shown (after installation or somewhere in admin panel...) about not to use any other facebook pixel plugins while using Facebook for Woocommerce.

Thanks for letting us know @mburakkalkan - that sounds like a good idea to me! cc @jconroy @layoutd maybe we should log an issue for that.

Yurchak commented 3 years ago

Hi!

I've come across this issue as well recently (Woocommerce user) and have only the Facebook for Woocommerce plugin installed. So the errors seem to have another source in my case.

jimbroze commented 3 years ago

Hi!

I've come across this issue as well recently (Woocommerce user) and have only the Facebook for Woocommerce plugin installed. So the errors seem to have another source in my case.

Me too!

viktorzahov commented 3 years ago

Same problem here. I'm using only the official FB plugin Facebook for WooCommerce Version 2.2.0

The error for ViewCategory and Initiate checkout events Same event ID received for many event instances

Any suggestions?

senginee commented 3 years ago

Same Problem here.

Bildschirmfoto 2021-02-18 um 11 18 06
joelkarunungan commented 3 years ago

I don't use the official FB pixel plugin only the FB plugin for WooCommerce. The issue persists.

jstdntknw commented 3 years ago

I run into the same issue with only the "Facebook for WooCommerce" plugin by facebook installed.

It shows the problem for AddToCart, InitiateCheckout & Purchase.

KamGraphica commented 3 years ago

Hello - We are receiving this error as well on a clients site in the past few days and as as recent as this morning. We have the following plugins installed and we are not using any overlapping FB pixel plugin.

Error

fb-pixel-diagnostics

Woocommerce / site setup

WP Rocket cache settings

WP Rocket includes an add-on setting that will host these Facebook Pixels locally on your server to help satisfy the PageSpeed recommendation for Leverage browser caching.

Screen Shot 2021-02-23 at 8 21 42 AM

Business page connected via the FB Plugin

fb-plugin

Any input / feedback on this would be greatly appreciated as I just wrapped up a call with Facebook ads team and they stated everything "looks good" but can't provide details on plugins / 3rd party integrations.

This seems to be the place :)

Cheers!

chrismccreery commented 3 years ago

Having the same issue as well running 2.3.1 and WPRocket but have the Add-On disabled.

ker8 commented 3 years ago

Confirmed we have the same issue as well with Facebook for Woocommerce plugin version 2.3.1.

P4FLucky commented 3 years ago

Same problem here. The issue persists. Any suggestions?

jimbroze commented 3 years ago

I already had a plugin that creates XML product feeds (Instead of the Facebook plugin shop sync) so swapped to an unofficial Facebook pixel plugin and my problems are all gone.

VivekManglani commented 3 years ago

I just noticed this issue with our Pixels too, however, after looking through the plugin code it looks like sending the same event from the browser and the server is intentional and within the FB spec.

This is done to avoid missing any events from being tracked on the browser. More on this here: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#event-deduplication-options

That being said, we're confused as to why we receive this warning despite the event_id and event_name being the same on the server and browser event. We're also confused as to why we only receive this warning for AddToCart events considering this duplication is happening for every event.

One guess is that this needs to be manually enabled by Facebook via your Facebook representative. See Events Merging section: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#event-merging

joelkarunungan commented 3 years ago

I just noticed this issue with our Pixels too, however, after looking through the plugin code it looks like sending the same event from the browser and the server is intentional and within the FB spec.

This is done to avoid missing any events from being tracked on the browser. More on this here: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#event-deduplication-options

That being said, we're confused as to why we receive this warning despite the event_id and event_name being the same on the server and browser event. We're also confused as to why we only receive this warning for AddToCart events considering this duplication is happening for every event.

One guess is that this needs to be manually enabled by Facebook via your Facebook representative. See Events Merging section: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#event-merging

The errors for duplicates for ViewCategory, ICs, and Checkouts may all be different causes. I do not encounter duplicate ICs and COs, only ViewCategory events.

Majority of advertisers are NOT given access to a rep and have no support at all. If you have access to one, please ask about this issue if it indeed needs to be enabled via a rep.

bshimm1992 commented 3 years ago

Can confirm this is still triggering from my side. A slightly different case whereby I'm actually getting duplicated purchases on a Facebook Ad event going on which is not ideal.

I'm sending most of the events to Facebook via Google Tag Manager and picking up objects from the datalayer to send across with it. However, I also have the Facebook for Woocommerce (v2.3.2) installed to link up the product set to the 'Shop' function of Facebook. I'm wondering if there's a conflict between the plugin sending event data and those that I've manually configured in Google Tag Manager?

Portekoi commented 3 years ago

Do you sent event_id and event_name like :

fbq('track', 'Purchase', {currency: 'EUR', value: 123, content_name: 'PUR'}, {eventID: 'UNIQUE_ORDER_ID'});

In my side, I was sending Event_Id et not EventId.

If there is no error, try to contact facebook support to enable merging option.

bshimm1992 commented 3 years ago

I've paused the GTM integration and passing all of the events directly through the plugin instead and this seems to have fixed the duplication error, at least for now so will monitor it a bit further and when the client runs another Ads campaign. Will report back if I find anything else :)

dgulakov commented 3 years ago

Same thing... multiple events submitted with the same event_id and addtocart event cannot be deduplicated because server and client sent different event_id on the same user action. On first view plugin code looks okay, but something wrong here, probably storing event_id among user session in database especially when website under heavy load.

atikullamerchant commented 3 years ago

Hi Guys,

I'm still facing this issue, do we have a fix yet. Besides this, my purchases on Ad account dashboard show more than the actual; purchases. PS: The difference is not really double, so it's not the case where event is fired twice ALWAYS, it's just that the event is fired twice only in some cases.

image

ahmedelakkad commented 3 years ago

Same issue. Using pixel caffeine only with GTM integration. Any fixes yet anyone?

ahmedelakkad commented 3 years ago

We were seeing this too, it would appear it is caused by the fact that Facebook for Woocommerce plugin is sending both Pixel events and Conversion API requests and something is going wrong at the point of de-duplication.

Until this is fixed you can alleviate that by commenting out this function call

$this->send_api_event( $event );

In facebook-for-woocommerce/facebook-commerce-events-tracker.php within inject_add_to_cart_event function to prevent the plugin from sending server side events for AddToCart.

Search event should have a similar function call within its appropriate function

The above warning goes away after few days.

Has anyone tested this? Thanks!

TheDataProtector commented 3 years ago

We were seeing this too, it would appear it is caused by the fact that Facebook for Woocommerce plugin is sending both Pixel events and Conversion API requests and something is going wrong at the point of de-duplication. Until this is fixed you can alleviate that by commenting out this function call $this->send_api_event( $event ); In facebook-for-woocommerce/facebook-commerce-events-tracker.php within inject_add_to_cart_event function to prevent the plugin from sending server side events for AddToCart. Search event should have a similar function call within its appropriate function The above warning goes away after few days.

Has anyone tested this? Thanks!

Needless to say that's a nonsense since sending duplicated ids through the website AND the server API is the desired behavior to confirm events (then facebook will "deduplicate" on its own matching website and server ids). The problem here is that we are all getting duplicated ids when they should be distinct events, hence is not a problem getting duplicated ids between website and server but it's a problem when two distinct ViewCategory (or add to cart or purchase) events get the same ids. This seems clearly a bug but it doesn't always happens and I've had no luck in tracking the origin yet. My guess is that is a cache related issue.

fylgjur commented 3 years ago

Also reported in 3905075-zen. The user reports that they formerly had Facebook Pixel as well as Facebook for WooCommerce but uninstalled the duplicate a while back, and there is no duplicate pixel code in header.php.

SaBoConsulting commented 3 years ago

I'm also still seeing this error. Only using Facebook for WooCommerce 2.3.5, not using Facebook Pixel plugin or GTM.

Please let us know about a status on this since I have been experiencing this since January 2021.

Cheers!

hamza-rizwan commented 3 years ago

Same issue. No other plugin installed. Just the "Facebook for Woocommerce"

I was also wondering, is this is related to the fact that when I go to Events Manager and see the number of events received, they don't really make sense. My Google Analytics is showing far greater numbers than what I see in Events Manager. And may be due to this, I am unable to create a Custom Audience in Ads Manager using PFB Pixel value-based source because it says "Website Traffic too Low"

If all this is somehow linked, this issue seems to be super critical.

TheDataProtector commented 3 years ago

Same issue. No other plugin installed. Just the "Facebook for Woocommerce"

I was also wondering, is this is related to the fact that when I go to Events Manager and see the number of events received, they don't really make sense. My Google Analytics is showing far greater numbers than what I see in Events Manager. And may be due to this, I am unable to create a Custom Audience in Ads Manager using PFB Pixel value-based source because it says "Website Traffic too Low"

If all this is somehow linked, this issue seems to be super critical.

Shouldn't be linked really, differences between Google Analytics and Events Manager are intrinsic in their way of tracking. Plus, differences will worsen when FB will enforce new iOS 14 policies. Hence this bug needs to be addressed asap to avoid polluting data even more.

AashikP commented 3 years ago

Another report in 3928113-zen

bastien-rom commented 3 years ago

Β I’m currently having the same issue. I'm only using "Facebook for Woocomerce". I added a log inside the "inject_add_to_cart_event" function in facebook-commerce-events-tracker.php and it appears twice in the log file for each product added to cart. It seems like this function is called 2 times : first when the product is added to the cart (event_source_url is the product's url) and a second time when you're on the cart page (event_source_url is the cart's url) but only the second one has the same id as the event triggered by the pixel.

TheDataProtector commented 3 years ago

Β I’m currently having the same issue. I'm only using "Facebook for Woocomerce". I added a log inside the "inject_add_to_cart_event" function in facebook-commerce-events-tracker.php and it appears twice in the log file for each product added to cart. It seems like this function is called 2 times : first when the product is added to the cart (event_source_url is the product's url) and a second time when you're on the cart page (event_source_url is the cart's url) but only the second one has the same id as the event triggered by the pixel.

Yes, there are two calls for the function but no, the one called after the add to cart event is called after a check against the WooCommerce option "redirect to the cart page after successful addition". That could (potentially?) trigger a double event if the option was true BUT I'm still seeing this on multiple websites with the option turned off. Please confirm you have "redirect to the cart page after successful addition" option on.

Plus, you are seeing multiple events with different (or no) ids, the problem we are facing here is that multiple events get sent with the same id.

bastien-rom commented 3 years ago

I’m currently having the same issue. I'm only using "Facebook for Woocomerce". I added a log inside the "inject_add_to_cart_event" function in facebook-commerce-events-tracker.php and it appears twice in the log file for each product added to cart. It seems like this function is called 2 times : first when the product is added to the cart (event_source_url is the product's url) and a second time when you're on the cart page (event_source_url is the cart's url) but only the second one has the same id as the event triggered by the pixel.

Yes, there are two calls for the function but no, the one called after the add to cart event is called after a check against the WooCommerce option "redirect to the cart page after successful addition". That could (potentially?) trigger a double event if the option was true BUT I'm still seeing this on multiple websites with the option turned off. Please confirm you have "redirect to the cart page after successful addition" option on.

Plus, you are seeing multiple events with different (or no) ids, the problem we are facing here is that multiple events get sent with the same id.

My bad, I thought this was causing the issue. Yes, the "redirect to the cart page after successful addition" option is turned on.

ghost commented 3 years ago

Having the same error in my pixel, any fix for this yet? Thanks.

AlbertGajsak commented 3 years ago

Hi, any updates on this issue?

solstudioim commented 3 years ago

Reported as well here on the forum: Same Event ID Received for Many Event Instances

aj-adl commented 3 years ago

We've been experiencing this issue for a while now - no GTM related FB events, no additonal pixel plugins or other nonsense - just Facebook for WooCommerce 2.5.1 (latest at time of writing).

solstudioim commented 3 years ago

Reported as well on the forum: Purchase Event Missing Some Deduplication Parameters

santiroa123 commented 3 years ago

I am also having this issue. I have the Facebook sales channel on Shopify (which should be kind of the same as the one for woocommerce). I don't have any pixel manually installed, neither any tracking app. I've been looking for an answer for hours

senff commented 3 years ago

Reported in 30208110-HC.

shaunkuschel commented 3 years ago

Another report in 4078374-zen

shaunkuschel commented 3 years ago

Another report in 4120678-zen

neilmccreadie commented 3 years ago

Another report in 4217001-zen

chrism245 commented 3 years ago

Another report in 4216126-zen

dreamtooloud commented 2 years ago

Another Report: ZD-4306460

leonwhale commented 2 years ago

Just noticed the same issue for a client.

rawdreeg commented 2 years ago

I could not reproduce this issue today. It seems the problem is no longer reproducible. I will close this. Feel free to open a new issue ticket with more details if you're still experiencing this.