Track Custom Events With Google Analytics 4
文章推薦指數: 80 %
Configuring Your GA4 Tag In GTM SitecoreSolutions DigitalSolutions Work Insights AboutUs ContactUs IWant... SitecoreXMCloud SitecoreCDP SitecorePersonalize SitecoreContentHub SitecoreSend SitecoreOrderCloud SitecoreDiscover CoveoforSitecore HelpMeWith... SitecoreDevelopment SitecoreSupport SitecoreAudits SitecorePaaSandAzure SitecorePricing SitecoreXMvsXP SitecorevsWordPress SitecoreandCRMIntegration EmailUs:[email protected] IWant... Cloudflare Coveo CoveoforAEM HelpMeWith... GA4 ContentStrategy EnterpriseSEO SitecoreSolutions IWant... SitecoreXMCloud SitecoreCDP SitecorePersonalize SitecoreContentHub SitecoreSend SitecoreOrderCloud SitecoreDiscover CoveoforSitecore HelpMeWith... SitecoreDevelopment SitecoreSupport SitecoreAudits SitecorePaaSandAzure SitecorePricing SitecoreXMvsXP SitecorevsWordPress SitecoreandCRMIntegration EmailUs:[email protected] DigitalSolutions IWant... Cloudflare Coveo CoveoforAEM HelpMeWith... GA4 ContentStrategy EnterpriseSEO Work Insights AboutUs ContactUs Insights TrackCustomEventsWithGoogleAnalytics4 UsingGoogleTagManager ByTheresaGutierrez October20,2021 Home Insights HowToTrackCustomEventsWithGA4AndGoogleTagManager CustomEventTrackingInGoogleAnalytics4 Thereareanumberofdifferentwaystotrackeventsonyourwebsite.WedecidedtodedicatethisblogtocreatingcustomeventsinGoogleAnalytics4usingGoogleTagManager.Thereareanumberofstepsinvolvedwiththisprocessthroughourexample,outlinedbelow: FindingYourMeasurementID ConfiguringYourGA4TagInGTM VariableSetUp TriggerSetUp TagConfiguration DebuggingOurTags FrequentlyAskedQuestions GoogleAnalytics4Vs.UniversalAnalytics WithGoogleAnalytics4(GA4),thereareafewkeydifferencesfromUniversalAnalytics(UA).TrackingcustomeventsisonlyonepartofwhatispossiblewithGA4. GooglehasannouncedthattheywillbediscontinuingtheUAplatforminJune2023.AfterJuly1,2023,wewillhavetosaygoodbyetoUAasitwillnolongerbeprocessinganynewwebsiteactivityorhits.IfyouneedguidanceonsettingupyourGA4property,readourlatestbloghere. WhenitcomestotrackingeventsinGoogleTagManager,werecommendsettingupyourGA4tagsinparalleltoyourexistingUAtags.OncethedatafromyourGA4tagsispopulatingcorrectly,youcanbeconfidentthatthemigrationfromUAtoGA4willgosmoothlyafterJuly1,2023. EventTrackingWithGA4 GA4hasautomaticeventstracking,alsoknownasEnhancedMeasurement. Thereare4eventtypesinGoogleAnalytics4: Automaticallycollectedevents EnhancedMeasurementevents Recommendedevents Customevents WhenplanningwhicheventsyouwanttotrackwithGA4considerthefollowingbeforestructuringyoureventsanddecidingonnamesandparameters: 1.Checkiftheeventyouwanttotrackiscollectedamongsttheautomaticallycollectedevents. 2.Ifitisnotanautomaticallycollectedevent,checkifitisalreadyincludedintheEnhancedMeasurementevents.Theseeventsinclude: page_view scroll click view_search_results video_start/video_progress/video_complete EnhancedMeasurementeventsarenotautomaticallyenabledinyourGA4property.ToenableordisableEnhancedMeasurement,clickAdmin,andnavigatetothepropertyyouwanttoedit.InthePropertycolumn,clickDataStreams,thenWeb.HereyoucanslidetheswitchunderEnhancedmeasurementtoOntoenablealloptions.YoucanalsoclickSettingstoeditindividualoptionsasneeded. 3.IftheeventyouwanttotrackisnotcoveredintheEnhancedMeasurementevents,checkouttherecommendedeventsandGoogle'snamingconventionshereformoreinformation: Generic(Forallproperties) OnlineSales Games 4.Ifnoneoftheabovescenariosapplytotheeventyouwanttotrack,wewillgooverhowtocreateacustomevent. Thisblogpostwillfocusonthefourthoption,creatingcustomeventsusingGA4andGoogleTagManager(GTM).Assuming,youhaveGTMsetuponyourwebsite.Creatingcustomeventsisnearlyidenticaltoconfiguringrecommendedevents,butyouneedtocreateyourowneventnames.TherearenomoreEventCategory,EventAction,andEventLabelfields. Forexample,ifourcustomeventwastotrackformsubmissionsofacontactform,wecannameitanyofthefollowing: generate_lead contact_form submit_form Becarefulcreatingtoomanyneweventssince,atthemoment,thereisamaximumof500uniqueeventnamesperGA4property.Oncethelimitisreached,Googlesaysyouwon'tbeabletotrackanyneweventsordeleteanyoftheoldones. CreatingACustomGA4EventInGoogleTagManager WefirstneedtosetupourGA4tagintheGTMcontainertomakesureoureventtrackingisconnectedtoourGA4propertyandpopulatesaccordingly.Forthisblog,wewillbefocusingoncreatingacustomeventtotrackaspecificclickonourwebsitethatisn’tautomaticallydefinedbyGoogleinourGA4property.Wewanttobeabletotrackour“Let’sChat”buttonthatdirectsvisitorstotheContactUspage.Itlookslikethis: FindingYourMeasurementID First,weneedtoconnectourGA4propertyandourGTMcontainer.InyourGoogleAnalytics4property,selectthe"DataStreams"optionunderyourpropertyoptionsintheAdmintab. ClicktheGA4datastreamforyourdomain. HereyouwillfindyourGA4property'sMeasurementID.CopyandpastethisintoourGA4TagConfigurationinGTM. ConfiguringYourGA4TagInGoogleTagManager Beforecreatingourcustomeventtag,weneedtofirstconfigureourGA4taginGTMtoconnectthetwoapplications.InyourGTMcontainer,createanewtagusingthefollowingsteps: ClickNewTag LabelyournewGA4ConfigurationTag ChoosetheGoogleAnalytics:GA4Configuration InputYourMeasurementIDfromGA4 Clickthebox"Sendapagevieweventwhenthisconfigurationloads" ClickSave OnceourGA4tagisconfigured,weneedtosetupourcustomevent’sVariables,Triggers,andTags(preferablyinthisorder). VariableSetUp TherearetwotypesofvariablesinourGTMcontainer: Built-InVariables:Availableforthemostcommonlyusedtagandtriggerconfigurations.Onceenabled,theycanbeusedjustlikeuser-definedvariables. User-DefinedVariables:Customwebvariablestosuitspecificrequirementsthataren’tcoveredbybuilt-invariables. TherearemanydifferentBuilt-InVariablestoconfigureinGTMsuchas: Pages Utilities Errors Clicks Forms History Videos Scrolling Visibility ForthepurposeofourcustomeventconfigurationwewanttoenableourClickvariables. EnableClickVariables Becausewearetrackingcustomclickeventsonourwebsite,wewillfocusonenablingalloftheclickelementsinthelistofBuilt-inVariablesinGTM.Inordertoenablethem,simplyclickConfigureinthetoprightcorneroftheBuilt-InVariablessectioninourVariablestab,andclickalltheboxesunderClicks. TriggerSetUp Thecustomeventtriggerisusedtotracktheinteractionsthatoccuronourwebsites/appsinGTM.Forourexample,whenanelementisclickedonapagethatmatchesthetriggerconditions,GTMwillautomaticallypopulatevaluesforanyactiveclick-basedbuilt-invariables. TocreateanewcustomeventtriggerinGTM: ClickTriggersontheleftsidemenu,thenclickNew ClickTriggerConfigurationandchoosetheAllElementsundertheClicktriggertype ClickSomeClicks Configuretheconditionswhichneedtobetrueforthiseventtofirethistrigger ClickSave. So,configuringourGTMtriggertofirewhensomeoneclicksthe“Let’sChat”buttononourwebsitewillrequireidentifyingsometriggerconditions.Inthisexample,weindicatedthatourclicktextequalsLET’SCHATandourclickURLcontains/contact-us. Inordertoaddorremovetriggerconditions,simplyclickthe“+”or“-“symbolsnexttoit. HereiswhatourfinishedTriggerconfigurationlookslike,nowlet’sclicksave. TagConfiguration Finally,it’stimetoconfigureourtagforourcustomevent:Let’sChatButtonClicks.Sincewealreadysetupthebulkofthetag,indicatingwhichtriggerconditionswillfirethetagwhenacustomeventhappensonourwebsite.AllwehavetodonowiscreatetheeventtaginGTMtokeeptrackofitinourGA4property. SelectGoogleAnalytics:GA4EventasourTagType SelectGA4TagastheConfigurationTag Nameyourcustomevent,inthiscase,wewilluseletschat_button ConnectourLet’sChat-ButtonTriggertoournewtag ClickSave NowthatourcustomeventisconfiguredinGTM.Wehavetomakesureourtagworks! DebuggingOurTags Wearealmostdonefinalizingournewtags,butfirst,weneedtotestthem!GTMhasapreviewoptiontobeabletoloadourwebsiteandclickthroughthesiteinanattempttogetourtagstofire.Let’sstartbyclickingthePreviewbuttoninthetoprightcornerofourGTMworkspace. Next,wearegoingtoenterthedomainwherewewanttotestourtagsusingtheGoogleTagAssistantandclickConnect. Thiswillopenyourwebsiteinanewwindowandyouwillbeabletonavigateyoursitetogettofirethenewtagwejustsetup.Onceyoutakethenecessarystepstosatisfyallofthetriggerconditionsweoutlinedearlier,weshouldbeabletoseewhichtagsfiredbackintheoriginalTagAssistantwindow. Youshouldseeawindowthatlookslikethis. Underthe“TagsFired”section,giveneverythingwassetupcorrectly,weshouldseeourLetsChat-ButtonClick.Ifyoudon’t,you’llneedtodosometroubleshootingtoseewhythetriggerisn’tworkingandyourtagtonotfireproperly. PublishingOurTags Oncewe’vetestedallofournewtagstoensuretheyarefiringproperly,it’stimetopublishourtags.Thismakesthetagsliveandreadytotrackourcustomeventdata. Onceyou’reready,clickSubmitandfillintheVersionNameandDescriptionofthenewworkspacechangesyouwanttopublish.Andyou’redone!Thenewtagsshouldnowbeliveonyoursiteandreadytotrackevents. FindingCustomEventsInGoogleAnalytics4Reports Allow24hoursforyoureventdatatopopulateintoGA4.FeelfreetotriggertheeventyourselfsothatyourGA4reportshavesomeeventdatatocompile.Thebuilt-inreportingfunctioncanbefoundhere: ClicktheReportstabinGA4leftsidemenu ClickEngagement,thenEvents Feelfreetoconfigurethispagetoshowthespecificeventinformationyouneedinyourreporting. NextSteps WehopeyoufoundthisbloghelpfulincreatingcustomeventsusingGTMinconjunctionwithGA4.Thismethodprovidesuswiththeabilitytocreateandtrackeventsforallofourobjectives.GA4'senhancedmeasurementfunctionalitytracksalotofvaluableinformationbydefault.ButcoupledwithGTM'srobustbuilt-infunctionalityandflexibility,weareabletotakeourGA4trackingandreportingtoanewlevel. RemembertomarkyourcalendarsforJuly1,2023,tosaygoodbyetoUAandhellotoGA4.ThefriendlyfolksatFishtankareheretohelpyourenterpriseorganizationwithyourGA4migrationandGoogleTagManagerimplementation.Reachouttoourdigitalmarketingteamat [email protected]forallyourGoogleAnalyticsandGoogleTagManagerneeds. GA4>MFrequentlyAskedQuestions What'sthebestpracticewhennamingcustomeventsorparametersonrecommendedevents? IftheeventyouwanttotrackisnotcoveredintheGA4EnhancedMeasurementevents,checkoutGoogle'snamingconventionsforrecommendedeventshere. What'sthemaximumnumberofcustomeventsyoucanhaveinGA4? Googleimplementedcollectionandconfigurationlimitof500distinctlynamedeventsonaper-propertybasis.Clickhereformoreinformation. WhenwillGooglediscontinueUniversalAnalytics? GoogleannouncedtheywillbediscontinuingtheUniversalAnalytics(UA)platforminJune2023.AfterJuly1,2023,UAwillnolongerbeprocessinganynewwebsiteactivityandhitsandeveryonewillhavetotransitionovertoGoogleAnalytics4(GA4)foralltheirwebsitetrackingneeds. IfyouneedhelpsettingupyourGoogleAnalytics4property,checkoutourblog. CanGA4replacecustomeventstagscreatedinGoogleTagManager&UniversalAnalytics? UntilJuly1,2023,WerecommendcontinuingtotrackyourwebsiteanalyticsinbothUAandGA4inparallel.ThismeanscontinuingtocollectdatainyourUniversalAnalyticsproperty(usingexistingUAtagsinGTM)andcreatenewGA4tagsforthesameevents. OncethedataisbeingreliablypopulatedinGA4youcanconfidentlymigratetohaveyourGA4propertyasyoursolesourceoftruthafterUAisdiscontinued. WatchOurWebinar! LearneverythingyouneedtoknowaboutCustomerDataPlatforms(CDPs). ExplorehowyoucanuseaCDPtodriverevenuethroughunforgettablecustomerexperiencesandunparalleledomni-channeldatacollectioninourengagingandcomprehensivewebinar. WATCHNOW MeetTheresaGutierrez DigitalMarketer ⛳🌮👩🏻💻 Theresa,aka'T',isahigh-energyDigitalMarketingcreativewith7+yearsofexperienceacrossvariousindustries.She'spassionateaboutprovidingdigitalmarketinganddesignforourtechnology-firstcompany,workingexclusivelywithSitecore.Tisanavidgolferanddogmomma,appeasedonlybyabevyofsomethingbubbly. ConnectwithTheresa
延伸文章資訊
- 1Track Custom Events With Google Analytics 4
Configuring Your GA4 Tag In GTM
- 2[GA4] Set up events - Analytics Help - Google Support
[GA4] Set up events. Collect additional information from your website or app through events. Goog...
- 3How to Track Events in GA4 (Google Analytics 4) - Loves Data
In Google Analytics 4, you can use events to track any action or piece of information you like. F...
- 4How to Track Events with Google Analytics 4 (Updated in 2022)
- 5A Guide to Google Analytics 4 Event Tracking - Torchbox
Custom event tracking in GA4 ... Custom event tracking relies heavily on a new feature in Google ...