Handling Duplicate Events - Conversions API - Facebook for ...
文章推薦指數: 80 %
We determine if events are identical based on their ID and name. So, for an event to be deduplicated: In corresponding events, a Facebook Pixel's eventID must ...
ConversionsAPIGetStartedUsingtheAPIVerifyingSetupGuidesParametersHandlingDuplicateEventsPayloadHelperBestPracticesTroubleshootingHandlingDuplicatePixelandConversionsAPIEvents
Foroptimaladperformance,werecommendthatadvertisersimplementtheConversionsAPIalongsidetheirFacebookPixel.Wecallthisa"redundantsetup"anddetailmoreaboutthisrecommendedapproachhere.
Whenadvertisersusearedundantsetup,theymustsetupadeduplicationmethodtoensurethattheaddeliverysystemisabletodifferentiatebetweendistinctandoverlappingevents.ThisdocumentdescribesmultiplededuplicationmethodoptionstohelpFacebookdeduplicateyourevents.
AdvertiserswhodonotsendthesameeventtwiceviaboththeConversionsAPIandFacebookPixeldonotneedtosetupdeduplicationforthoseevents.
EventDeduplicationOptions
FacebooktriestodeduplicateidenticaleventssentthroughFacebookPixelandtheConversionsAPI.Wehavetwowaysofdeduplicatingyourevents:
EventIDandEventName(Recommended)
RequiredParameters
Forthisapproach,theevent_idparameterisaddedtoyoureventsfromboththeConversionsAPIandthebrowserpixel.Theevent_idparameterisanidentifierthatcanuniquelydistinguishbetweensimilarevents.Readmoreabouttheevent_idparameter.
ApproachDescription
WedetermineifeventsareidenticalbasedontheirIDandname.So,foraneventtobededuplicated:
Incorrespondingevents,aFacebookPixel'seventIDmustmatchtheConversionAPI'sevent_id.
Incorrespondingevents,aFacebookPixel'seventmustmatchtheConversionAPI'sevent_name.
Onceyoureventfulfillsbothconditions,wekeepthefirstoneandremovethefollowingone.Ifaserverandbrowsereventarriveatapproximatelythesametime(within15secondsofeachother),wefavorthebrowserevent.
NotethattheeventIDparameterforthepixelisthe4thargumentinthefbqtrackcall.
Example
fbq('track','Purchase',{value:12,currency:'USD'},{eventID:'EVENT_ID'});
FBPorExternalID
RequiredParameters
Forthisapproach,youmustuseevent_name,fbpand/orexternal_idconsistentlyacrossbrowserandserverevents.
ApproachDescription
Ifyouhaveconfiguredtheexternal_idand/orfbpparameterstobepassedviabothbrowserandserver,wetakecaretoremoveduplicateeventsautomatically.Thisishowtheprocessworks:
Yousendusabrowsereventwithevent_nameandfbpand/orexternal_id.
Then,yousendusaservereventwithevent_nameandfbpand/orexternal_id.
Wecomparetheservereventwiththepreviouslysentbrowserevent.Specifically,wecomparetheevent_nameandfbpand/orexternal_idcombinations.
Ifweseethatwealreadygottenthateventfromthebrowser,wediscardtheserverevent.
ApproachLimitations
Thisdeduplicationmethod:
Alwaysdiscardstheserverevent.
Onlyworksfordeduplicatingeventssentfirstfromthebrowserandthenthroughtheserver.Servereventswillnotbediscardedifabrowsereventhasnotbeenreceivedinthepast48hours,evenifanidenticalbrowsereventarrivesaftertheserverevent.
Doesnotdeduplicateeventswhenonlyusingoneeventsource,thatisbrowser-onlyorserver-only.Ifyousendustwoconsecutivebrowsereventswiththesameinformation,wedonotdiscardeither.Ifyousendustwoconsecutiveservereventswiththesameinformation,wedonotdiscardeither.
SettingUpDeduplicationontheBrowserPixel
Forbettermatching,weneedaccurateinformationfromyoureventscomingthroughbothFacebookPixelandtheConversionsAPI:
TheeventIDinsidetheoptionaleventDataparametershouldbeauniquevalue.DependingonyourFacebookPixelimplementation,youcanuse:
tracktosendtheeventforallpixelsonthepage
fbq('track','Purchase',{value:12,currency:'USD'},{eventID:'EVENT_ID'});trackSingletosendtheeventforonepixel
fbq('trackSingle','SPECIFIC_PIXEL_ID','Purchase',{value:12,currency:'USD'},{eventID:'EVENT_ID'});Animagepixeltagwiththeeidparameter
延伸文章資訊
- 1Facebook Conversions API (CAPI) - Facebook Pixel FAQ
These changes will affect how Facebook receives and processes conversion events from tools such a...
- 2使用FB Conversions API增加事件與Facebook Pixel兼容 - 歐斯瑞
在相應的事件中,Facebook像素eventID必須與轉換API匹配event_id。 在相應的事件中,Facebook像素event必須與轉換API匹配event_name。 若是雙方事件時...
- 3Handling Duplicate Events - Conversions API - Facebook for ...
We determine if events are identical based on their ID and name. So, for an event to be deduplica...
- 4How do I send event_id with Facebook pixel? - Stack Overflow
To add an event_id parameter to the events you're sending through your pixel, go into your websit...
- 5How to set up Facebook event deduplication in Google Tag ...
For this method, you must use event ID for all events you send via pixel and CAPI. FB will dedupl...