The Ultimate Guide to Facebook Pixel integration | Renta
文章推薦指數: 80 %
On the surface, implementing Facebook Pixel seems a difficult task. ... and currency from the data of ecommerce Google Analytics to Facebook ... Renta/Blog/Analytics/TheUltimateGuidetoFacebookPixelintegrationTheUltimateGuidetoFacebookPixelintegrationSergeyDovganichCEOatRentaApril2720215minutesOnthesurface,implementingFacebookPixelseemsadifficulttask.HoweveritopensnewopportunitiesforproductiveworkinFacebookAds.InthisguidebelowweaddressedindetailthequestionsyoumayfacewhilesettingFacebookPixel.Unfortunately,thenavigationthroughthearticlecouldnotbedisplayed.CheckifJavaScriptisenabledinyourbrowserNavigationUnfortunately,thenavigationthroughthearticlecouldnotbedisplayed.CheckifJavaScriptisenabledinyourbrowserWhat’sFacebookPixelandwhywouldyouneedit?FacebookPixelisafragmentofJavaScriptcodethatgetsaddedtothewebsitepages.Thetrackerhelpsevaluateadsperformanceandexploreuseractions(events).Whentheuserperformsacertainaction,forinstance,addsaproducttothecartorplacesanorder,PixelsendstheinfotoFacebookAds. Whyisthisneeded?SetconversiontrackingByaddingPixeltothewebsiteandsettingeventtrackinginAdsManager,you’lllearnwhichtargetedactionsareperformedbytheuserswhocametoyourwebsiteviaInstagramorFacebookads. FacebookAdsallowsyou tocreate17standardevents(thereusedtobe9before):purchase,lead,contentview,productsubscription,etc.We’llcoverthefulllistoftheeventsandtrackingoptionsbelow.Besides,you’llbeabletocreatecustomeventswhichwe’lltouchuponfurtheronaswell. Startingfromspring2021FacebookAdsallowstrackingupto8eventsforeachdomainname.Ifyouradsaccounthasmoreeventsyou’llhavetoprioritizetheminEventsManager.Eventuallyyou’llbeabletotrackconversionsfromadvertisingcampaignsandcheckAcquisitionCost(costofacquiringaclient).Allthedataincludingregistrations,clicks,andpurchaseswillbepresentedinFacebookAdsreports. SetremarketinglistsRemarketinglistshelptargetatpeoplewhopreviouslyvisitedyoursiteorperformedcertainactions: Example: addeditemstocartbutdidn’tplaceorder;visitedthesitewithinthepast30,60,90…180days;aretopactiveusersorspendonthesitemostofthetime;viewedcertainpages,forinstance,thecatalogorcertainitems.Youcansetcharacteristicsofuserstrulyinterestedinyourgoodsorservices.Targetscanbecombined.Youcanusepreviouslycollectedremarketinglistsforcreating“Similaraudiences”.Facebookalgorithmwillbelookingforusersthatareatmostsimilarwithwhoyouindicatedviayourremarketinglists.Thesystemwillconsidergender,age,interests,location,maritalstatusandothercharacteristicsofthesameaudience.OptimizeadvertisingcampaignsYoucanusestandardoruserconversionstoset “Optimizationforconversions”option.Facebookwilloptimizeadvertisingcampaignstoreachthemaximumnumberofconversionsduetothesetparameter:order,calltoamanager,websitevisit.Facebookwilltrackuseractionsonthewebsiteandautomaticallydisplayadstopeoplewithahigherchanceofconversion.With“Optimizationforconversions”you’lldecreasethecostofrequestsandpurchaseswhilegrowingtheirnumber.HowtocreateFacebookPixel?Therearetwooptions:viaBusinessManagerorviaAdsManager.BusinessManagerisoptimalforsettingPixel.Besides,BusinessManagerrevealsmoreopportunities:itallowstosharePixelwithotherusersormanageaccesstoAdsManagerorapage.CreatingFacebookPixelviaBusinessManagerBeforecreatingPixelstartanaccountinBusinessManager.Ifyoualreadyhaveone,makesureit’sstillavailable.Checkifyou’remanagingtheaccountyouplantouse. Howtoset:EnterthecompanysettingsinBusinessManager.Choosetheproperaccount.Gotothetab“EventsManager”—it’savailableinthequicklinks.Totheleftyou’llfindabutton«ConnectDataSource». Choosethedatasource“Web”.Press“GetStarted”.ChoosethemanualsettingofPixelcode. .FacebookwillgenerateaJavaScriptcode.Copyitbypressingthebutton“CopyCode”.NowwecanmoveontoGoogleTagManagertosetthetag.SettingPixelviaGoogleTagManagerNowlet’scheckhowtowithdrawPixelviaGTM:Tothatend:Createanewtag.Indicateitsname,forinstance,FacebookPixel. Specifythetagtype:CustomHTML.InsertthecodecopiedfromAdsManager. StandardcodegetsplacedonallthepagesandtracksPageView.InthetriggersettingsindicateAllPages.Savesettings.Note:theevent“PageView”isincludedinFacebookPixelbasecode.It tracksuserswhovisitthepagewithabasePixelcodeinstalled,inourcaseforalltheusersofthewebsite. Done!YouinstalledFacebookPixeltoyourwebsite. TrackingStandardEventsStandardeventsareactionsavailableinFacebookAdsbydefaultfortrackingeventsonthewebsite.Byaddingacodefortheeventtothesiteyou’llbeabletoregisterconversions,optimizeads,andcreateaudiences. LikewestatedbeforeFacebookallowstotrack17standardevents,whichbecomespossiblebycallingthefunctionfbq(‘track’,‘…’);withtheindicatednameoftheevent.BelowyoucanseeallthestandardeventsidentifiedbyFacebook.Pressoneachstandardactioninthesheetandthegeneratorwillofferyouacodefortheselectedaction. ActiononsiteDescriptionJS-codeAddtocartTheuseraddsitem(s)tothecart—forinstance,pressesthebutton“Addtocart”.fbq(‘track’,‘AddToCart’);Addtowishlist Theuseraddsitem(s)tothewishlist—forinstance,pressesthebutton“Addtowishlist”.fbq(‘track’,‘AddToWishlist’);AddpaymentinformationTheusergetstothepaymentpage—forinstance,pressestherelevantbutton.fbq(‘track’,‘AddPaymentInfo’);CompleteregistrationTheuserprovidesinformationinexchangefortheserviceyourcompanyoffers—forinstance,registersonthewebsiteorsubscribesforamailinglist.fbq(‘track’,‘CompleteRegistration’);ContactAnycontactbetweentheuserandthecompany:acall,email,SMS,chatmessage,etc.fbq(‘track’,‘Contact’);DonateTheuserdonatesmoneyinfavorofthecompanyorsomeinitiative.fbq(‘track’,‘Donate’);CustomizeproductTheusercustomizesproduct(s)withthesettinginstrumentorotherapplicationofthecompany.fbq(‘track’,‘CustomizeProduct’);InitiatecheckoutTheuserinitiatescheckout—forinstance,pressesthebutton“Checkout”.fbq(‘track’,‘InitiateCheckout’);PurchaseTheusercompletespurchasewhichisindicatedbyreceivingtheorder,purchaseconfirmation,orsendingacheckforsuccessfultransaction—forinstance,redirectingtoapagewithorderconfirmationorapagewithathankyoumessage.fbq(‘track’,‘Purchase’,{value:0.00,currency:‘USD’});FindlocationTheuserlooksforoneofthecompany’spointstovisit—forinstance,whentheuserlooksforacertainproductandfindsitinoneofthecompany’sstores.fbq(‘track’,‘FindLocation’);LeadTheuserprovidesinformationwithunderstandingthatthecompanymaycontactthemlater—forinstance,signsupforatrialorsendsafilledapplication.fbq(‘track’,‘Lead’);ScheduleTheusersignsupforameetinginoneofthecompany’spoints.fbq(‘track’,‘Schedule’);StarttrialTheclientstartsusingatrialperiodofworkingwiththeproduct—forinstance,signsupforanappropriatesubscription.fbq(‘track’,‘StartTrial’,{value:‘0.00’,currency:‘USD’,predicted_ltv:‘0.00’});SearchrequestTheusertypesarequestonthewebsite,apporothermonetizationobjectthatbelongstothecompany—forinstance,lookingforaproductorservice.fbq(‘track’,‘Search’);SubscribeTheusersignsupforapaidsubscriptionforaproductorserviceofferedbythecompany.fbq(‘track’,‘Subscribe’,{value:‘0.00’,currency:‘USD’,predicted_ltv:‘0.00’});SubmitapplicationTheusersubmitsanapplicationforaprogram,product,orserviceofferedbythecompany—forinstance,forajobposition,educationalcourse,oraproductcurrentlyunavailableonthewebsite.fbq(‘track’,‘SubmitApplication’);ViewContentTheuservisitsthepagethatthecompanyisinterestedin—forinstance,atargetedpageoraproductpage.Howeveryouwon’tknowwhichinformationtheuserwentthroughorwhathedidonthepage.fbq(‘track’,‘ViewContent’);Theexamplebelowshowstrackingtheevent“Addtocart”: TosettrackingontheGoogleTagManagersideyouneedto: Todothis:CreateanewtagofHTMLlevelAddanecessarymethodoftheeventtracking.Inourcaseaddingaproducttothecart. Payattentiontothetagsettings. .It’simportantthattheeventcodeturnsonafterFacebookPixelbasecode.Asanactivationtriggerindicatethetriggerresponsiblefortrackinganecessaryaction. Let’slookatanotherexample. Trackingtheevent«Purchase»:Youmaynoticethatbesidetheevent‘Purchase’wesendadditionaldata:valueandcurrency,wherevalueistherevenuefromthetransactioncurrencyisthecurrencyofthetransactionInthenextblockyou’llfindanexampleofhowtoinsertvalueandcurrencyfromthedataofecommerceGoogleAnalyticstoFacebookPixelcode. StandardeventsforecommerceprojectsbasedonGoogleAnalyticsEnhancedEcommerceTherearetypesofeventsinGoogleAnalyticscalledEnhancedEcommerce.Theinstrumentallowstocollectsuchdataas:id-transactions,sumoftransaction,dataonpassingthefunnelaswellasefficiencyofproducts,listings,andpromotions. We describedindetailhowtoimplementEnhancedEcommerceinthisguide.Insteadoffocusingonthetechnicalimplementationlet’scheckhowtogetEnhancedEcommercedataandtransferittoFacebookPixel.YoucantakedatafromEnhancedEcommerceandinsertitasvariablesintoFacebookPixel.Let’scovertheprocesswith“Purchase”example.ThisisthemainmetricofEnhancedEcommercemodulethattracksplacedorders.ThefollowingJavaScriptcodeisperformedwhentheuserplacestheorder:WithdataLayervariablesinGoogleTagManageryoucanreceivedataandtransferittoFacebookPixel.Say,youneedtogetrevenue(costoforder).Let’sgothroughtheprocessstepbystep:GotoGoogleTagManager.Inthetab“Variables”createtwovariables(revenueandcurrency).Todothischoosethetagconfiguration“DataLayerVariable”andwritethewholepaththatweindicatedabove.Forthefirstvariablethepathwouldbeecommerce.purchase.actionField.revenue:Createthesecondvariablethesamewaybutwiththenameecommerce.currencyCode.Nowlet’screatesendingofthecompletedpurchasedirectlytoFacebookAds.Todosogotothetab“Tags”.CreateatagonCustomHTMLlevel(justlikeinthestandardsettingofPixelinGTM).InsertPixelcodeintothecodefortheevent“Purchase”.Inthetriggersettheeventthatwillturnoninthemomentofcheckout.NowduringthetransactionthedatawillbecapturedfromDataLayerandsenttoFacebookPixelwiththehelpofGTM.Importantnote:describedtriggershouldcorrespondwiththetriggerthatsendsEnhancedEcommercedatatoGoogleAnalytics.TrackingCustomEventsCustomeventsareactionsthatarenotincludedinthelistofstandardeventsinFacebooklibrary.Youpickthenameforyourcustomeventsyourselfandseteachoneduetoyourgoals.Withcustomeventsyoucantrackandanalyzeunconventionaluseractionsandcreateaudiencesbasedonthisdata.CustomeventsaretrackedbycallingaPixelfunctionfbq(‘track’,‘trackCustom’);,withauniquenameoftheeventforaspecificactionindicated.Maximumlengthforanameis50symbols.Justlikestandardevents,customeventshelptrackactionsofyourwebsitevisitors.Howeveronlyiftheyworktogetheryou’llgetafulloutputfromFacebookPixel.Examplesofcustomconversions:signupforanewsletter;goingthroughonboarding; ahamomentinaproductForinstance,youwanttotrackuserswhosignedupforanewsletter.Inthiscasethecodefortheeventcanlooklikethis:Youcanalsosendadditionaldatalikeanameoraformidentifierofthenewsletter(inordertousedataforusersegmentationlateron):Where:Newsletter—nameoftheevent(youcanpickanyname).form_nameandform_id—additionalparametersfortheevent.Therecanbeasmanyasyouneed.SettingtheeventtrackingonGoogleTagManagersideisthesameasforstandardevents.Note:totrackactionscorrectlythemainPixelcodehastoloadBEFOREtheeventcodestartsloading.OtherwisePixelwon’tregisterandtrackit. Conversionwindow(attribution)ThisisatoolthatpassestoFacebooktheinformationondataofwhichperiodshouldbebesttouseforamoreeffectivemarketingcampaignoptimization.“Conversionwindow”showswhethertheaction,whichtheusermadeafteracertaintimeafterviewingtheadorclickingonit,isrelevantforfurtheradsoptimization. WithintheselectedtimeframeFacebook“tracks”theuserthatinteractedwiththead.Thesystemtrackssitevisitsandadsview.Ifwithinthestatedtimeperiodtheuserthatsawtheadplacesanorderviayourlink,Facebookwillcountitasconversion.Evenifthepurchasewasmadeviaanothersourcelikesearchresults,thesystemwillconsiderthattheadinfluencedtheuser.Sotheactioncanbeusedasanadditionalsourceforoptimization. Earlyin2021changesweremadetoattributionssettings.ApplereleasedanupdatediOS14,whichlimitsreceivingandprocessingconversioneventsregisteredbyinstrumentslikeFacebookPixel.NowFacebookhastorequestpermissionforchangingtheconversioneventsonAppledeviceswithiOS14viaAppTrackingTransparencеframework.InresponsetonewApplerules,Facebookchangedattributionsettings.Newattributionwindowsettingispresentedonanadsgrouplevelandwillsubstitutesettingsontheaccountlevel.Itisavailableinthedepartment“Optimizationanddisplay”onthecampaigncreationlevel. EarlierinFacebookAdManagertherewerebydefaulttwoparametersfortrackingusers:“Afterclickingonthead”and“Afterviewingandclickingonthead”.Forbothparameterstimeoftrackingcanbechosen—eitheronedayorsevendays.Aftertheupdatethesettingsupportsfourattributionwindows:onedayaftertheclick; sevendaysaftertheclick;onedayaftertheclickandonedayaftertheview;sevendaysaftertheclickandonedayaftertheview.iOS14campaigns,aimedatappinstallation,willuseAPISKAdNetworkframeworkfromApple.UntilAppleimplementsAppTrackingTransparency(АТТ),theattributionwindow“Sevendaysaftertheclickandonedayaftertheview”willbeusedbydefault.Theabovemeansyouhavetonecessarilytaketwoactions:Confirmdomain.Facebookpreparedaninstructionforit. Setprioritizationofevents. Let’scheckhowtosetprioritizationofevents:nEventsManagergotothetab“DataSources”.ChoosecreatedPixelandopenthetab“AggregatedEventMeasurement”.Inthetabyou’llbeofferedtoconfirmthedomainifyouhaven’tdonesoyet.Ifthedomainisconfirmed,EventsManagerwillofferyoutochoosepriorityforyourevents.YoucanindicateyourPixelandselectastandardoracustomevent.Youcanpickuptoeightslotsofevents.There’slowandhighpriority.Howdoesitwork? ApplewillaskuserswhoenterthesitefromadevicewithiOS14andlaterversionswhethertheyallowtosharethedatawiththecompany.Iftheuserallowsdatasharing,theiractionsonthesitewillbesenttoFacebookPixel.Ifthevisitordeniesdatasharing,FacebookPixelwillreceiveonlyoneactionwiththehighestpriority. Forinstance,youownanonlinestore.Yousetseveralevents:viewproductcard,addtocart,completetransaction.You’llhavetosetpriorityfortheeventsdependingonyoursalesfunnelwherethehighestpriorityshouldbethefinalgoal,i.e.Purchase.ThenAddtocartfollowsandthelowestprioritywouldbeforViewproductcard.Thisishowyou’llstillgettotrackyourmostvaluableconversioneveniftheuserwithadeviceoniOS14orlaterversionsdidn’tpermittosharedata(theaggregateddatawillstillbetransferred).FacebookPixelHelperThisisanextensionforGoogleChromethathelpstrackwhethertheimplementedFacebookPixelworkscorrectly.ThepluginshowsPixelIDinstalledonawebsiteandconversionsthatgotoFacebookAds.ItisconvenienttousefordebugandremovingmistakesinPixelcode.InstallFacebookPixelHelper—itsiconwillappearnexttotheaddressbar.Tolaunchtheextensiongotoyourwebsiteandclickonthepluginicon.Therewillbeapop-upwindowwithinformationwhichPixelsandeventswerefoundonthepageandwhethertheyloadedsuccessfully.IfyouaddedstandardeventstoPixelcodeonsomepages,runatestconversionforeach.Thisishowyoumakesurethattheeventsworkcorrectly—getloadedontherelevantpageandafterthespecificaction.Forinstance,totesttheevent“Contact”sendamessagetochatonawebsiteandtotesttheevent“AddtoCart”addanitemtothecart.FAQHowmanyPixelscanyoucreateonFacebook?WithinoneBusinessManageraccountyoucancreateuptoahundredPixels.Howeverasaruleforyourworkyou’llonlyneedone.IsFacebookPixelfree?Yes,it’safreeplugindevelopedbyFacebook.Thisblockwillbeexpanded.IfyouhavequestionsaboutFacebookPixelanditssetting,aswellasstandardorcustomevents,feelfreetoaskinthecommentstothisguide. 27.04.2021SergeyDovganichMarketingETLRentarapidlymovesdatafrom30+sourcesintoadatawarehouse.Tryittoday!CreateaccountFreefor7days.NocreditcardrequiredComments(6)CancelreplySendcommentNameEmail(willnotbepublished)Savemyname,email,andwebsiteinthisbrowserforthenexttimeIcomment.
延伸文章資訊
- 1The Facebook Pixel: What It Is and How to Use It - Hootsuite ...
How much a conversion event is worth; Currency; Content type; Predicted long-term value. For exam...
- 2Facebook Pixel Conversion Value Tracking - Best Practice & Tips
By default, the currency parameter is set to your Facebook ad account's currency, so if you don't...
- 3Learn to Setup Facebook Pixel via Google Tag Manager
fbq('track', 'AddToCart', { value: 3.50, currency: 'USD' });. Each Facebook event has got one or ...
- 4Set the Value and Currency of Your Facebook Pixel Standard ...
- 5Set the value and currency of your Facebook pixel events
Change the value and currency of your standard events · Go to the web page where you placed the F...