Google Analytics Event Tracking Made Easy - Ironistic
文章推薦指數: 80 %
What types of events can I track with Google Analytics? This could be a long list. I'll cut to the chase and let you know how I personally use ... GoogleAnalyticsEventTrackingMadeEasyforYourSmallBusiness Posted:February16,2022 AndreaMacino DISCLAIMER:ThisarticleassumesyoualreadyhaveGoogleAnalyticssetupforyourwebsite.Itisalsointendedforbasicusesofeventtrackingfortheeverydayperson.IfyouneedadditionalhelpwithadvancedGoogleAnalyticstrackingimplementation,sendusamessageandwecanworkwithyoudirectly. Thepurposeofthiseventtracking“how-to”istosimplifytheprocessandmakeeventtrackingeasyandpainlessforanyone.Yes,anyone…evenifyouthinktheword“code”hassomethingtodowithasuper-secretencryptionmessageusedinthemovieNationalTreasurer.Anyways,thisguidewillexplainGoogleAnalyticseventtrackingingoodole’fashionedplainEnglish. Theverybasics,forthetruebeginners: Ifyoualreadyhavethebasicsdown,skiptothenextsection. Forthosestartingfromsquareone,herearesomesimpleexplanationsofeventtrackingandwhyyoushouldbeusingit. Whatisaneventforawebsite? Aneventisauserinteraction–interactionswithelementsofawebsitesuchasmenus,buttons,downloads,searchboxes,videos,orexternallinks. Whatiseventtracking? Eventtrackingallowsyoutomonitorandtrackaspecificuser’sinteraction/activity. Whyiseventtrackingimportantformyonlinesuccess? Chancesare,youarealreadyspendingatonoftime,money,orbothonyourwebsite.Eventtrackingistheonlywaytoidentifywhichelementsarehelpingyoutoreachyouronlinegoals.Itisimportantthatyou(oryouronlinepartnerlikeIronistic)measurethisdatatodeterminewhere,andhow,improvementscanbemadetoincreaseyourreturnoninvestment. WhattypesofeventscanItrackwithGoogleAnalytics? Thiscouldbealonglist.I’llcuttothechaseandletyouknowhowIpersonallyuseeventtrackingthemostforourclients: Emaillinkclicks Bannerclicks Adclicks Formsubmissions Externallinkclicks Documentdownloads Videoprogress(start,stop,pause,buffer) andthelistgoeson… Okay,solet’sgettoit. IcouldwriteafewparagraphsexplainingalltheinformationintheGoogleDeveloper’sGuide,butthisiseventtrackingmadesimple…soIwillskipallthetechnicaljargon.YoucanreviewGoogle’sguidehereifyouwanttolearnmore. HereisaquickreferenceguidefortheelementsofHTMLcodethatwewillbedefininginthenextstep(bearwithme,it’sactuallynotasbadasitseems). UniversalAnalytics(analytics.js) ga(‘send’,‘event’,‘category’,‘action’,‘label’,value); Anatomyofeventtrackingdefined: category(required) “Thenameyousupplyforthegroupofobjectsyouwanttotrack.” ThisisimportantbecauseitdetermineshowyourdatawillbeorganizedinGoogleAnalytics.Itcanbeanythingyouwantreally…let’ssayyouhave5contactformsthroughoutyoursiteyouwanttotrack.Youcouldmakethecategoryforeachone“contact”. action(required) “Astringthatisuniquelypairedwitheachcategory,andcommonlyusedtodefinethetypeofuserinteractionforthewebobject.” Usingthecontactformexampleabove,theactionherewouldsimplybe“submit.”Someothersituationsmaybeappropriateforusing“click,”“download,”“play,”etc. label(optional) “Anoptionalstringtoprovideadditionaldimensionstotheeventdata.” ItypicallymakethistheURLor{{PagePath}}.Thatwayitiseasytoidentifywheretheeventtookplace.Usingourcontactformexample,ifauserfillsoutaformonourcontactpageIwillbeabletoseeinGoogleAnalyticswhensomeone“submits”(action)a“contact”form(category)fromthe“/contact/”page(label). value(optional) Anintegerthatyoucanusetoprovidenumericaldataabouttheuserevent. Honestly,inmostcasesthisisunnecessary…but,ifyouwanttogotheextramile,youcandefinethevalueyouplaceontheparticularevent.Learnmoreaboutcalculatingthevalueofyourvisitorshere. non-interaction(optional) Abooleanthatwhensettotrue,indicatesthattheeventhitwillnotbeusedinbounce-ratecalculation. Thiscanbeusefulifyouaretrackinganeventthattakesauseroffofyourwebsite(which,honestly,ifyouarelinkingoffyourwebsiteyoushouldalwaysopeninanewwindow!).Thiswillexcludeyourclickfrombeingcountedasabounce. Nowthatyouunderstandthebasicsofwhateventtrackingisandwhyyoushouldbeusingit…hereiswhereIwanttomakethiseasyforyou. GoogleTagManagervs.Hardcoding WhatifItoldyouthatthereisamoreflexiblewaytoimplementtrackingonyourwebsite,thatdoesn’tinvolvehardcodingeverypagebutfollowsthesameanatomystructureofeventtrackingthatyoujustreadabout?Tobeclear,GoogleTagManagerisnotareplacementforGoogleAnalytics.GoogleTagManagerissimply,asthenamesuggests,a“tagmanager”.IthasnoreportingcapabilitiesbecausethatisstillhandledbyGoogleAnalytics.Thinkoftagmanagementasthemiddleman.GoogleTagManagerisatagmanagementsystemthatincludesthesamefunctionalityasglobalsitetagsandletsyouconfigureandinstantlydeploytagsonyourwebsiteormobileappfromaneasy-to-useweb-baseduserinterface. SomekeybenefitsofusingGoogleTagManagerare: Removestheneedforeditingwebsitecodeoverandoveragain.ThroughtheGTMuserinterfaceyoucanadd,edit,enable,disableorremoveanytagwithjustafewbuttonclicks. Testanddeploytagsquickly.Adaptrapidlyandcost-efficientlyinresponsetochangesinmarketingconditions,searchengine,andsocialmedialandscapes.YouneedtomovefastandGTMempowersyouwithitsfunctionality. Advancedanalyticstrackingmadepossible.GTMprovidesmanybuilt-intagsandvariablesthroughwhichyoucanimplementadvancedtrackinginashortamountoftime. Efficienttagmanagement.Whenyouhavedozensoftagsformarketingandanalyticsonyourwebsite,havingitallinoneplacecanbealifesaver. Improvewebsitespeed.GTMtagsaredeployedasynchronously,meaningaslowloadingtagwillnotblockothertagsfrombeingfiredorexecuted. Let’sstartoffwithanexampleofhowtosetuptrackingfora“ContactUs”buttononyourhomepage.Youwanttotrackandseehowmanypeopleareclickingthisbutton. SettingupaTrigger Thetriggertellsthetagtofirewhenthespecifiedeventisdetected.Everytagmusthaveatleastonetriggerinordertofire.Let’snamethetrigger“Button–ContactUs”. TriggerType Sincewearetrackingclicks,wewanttouseClick–AllElements. TriggerFireon ThisindicateswhenthetriggerwillfireandsendsasignaltoGoogleAnalyticsthataneventisoccurring.Weareselecting“SomeClicks”becauseweonlywanttofocusonthecontactusbutton.Ifwedidallclicks,itwouldtrackeveryclickonthepage. FiringConditions Thisistellingthetriggerexactlywhentofireandsendthesignal.Let’ssetthisupas“ClickText–equals–ContactUs”.ThiswillfirethistriggerwhenthetextonthebuttonisequaltoContactUs.Thisensuresthatitwillnottriggeranyotherbuttononyourpage,becauseithastospecificallysay“ContactUs”. Now,savethetrigger. SettingupaTag Nowthatwehavethatsetup,wemustcreatethetagthatcorrespondstothetrigger.Thetag’sjobistosendtheinformationtoGoogleAnalyticsonwhateventwastriggered.Let’snamethetag“GAEvent–ContactUsButton”. TagandTrackType GoogleAnalytics:UniversalAnalytics.(Thiscorrespondstotheplatformit’ssendinginformationto.)TheTrackTypewillbeEvent. Thenextstepswillbesimilartotheanatomyofeventtrackingthatyoupreviouslyread. Category–ContactUs Action–Button Label– {{PagePath}} IchosePagePathbecausetheremightbemultipleContactUsbuttonsthroughoutyoursiteandwiththisvariable,youcanunderstandwhichpagetheyareclickingthebuttonon. GoogleAnalyticsSettings–thiscorrespondstoyourtrackingIDwhichconnectsyourGoogleAnalyticstoyourGTMaccount. Onceallofthatissetup,youwillconnectthecorrespondingtriggerwejustcreatedintheprevioussteptoyourtag.Ifyouforgettodoit,thetagmanagerwillremindyoubecauseeverytagneedstobeconnectedtoatrigger.Saveyourtag. Onceyou’vetestedyourtagsandtriggersinpreviewmodeandpublisheditinyourGoogleTagManageraccount,you’reallsettosetupconversiontrackinginGoogleAnalytics!KeepyourgoalsorganizedbygroupingsimilareventsinGoogleTagManagerintothesamecategory.SinceGoogleAnalytics(UA)limitsyouto20goalsperview,insteadofcreatingaseparategoalforeverycontactformeventyouhaveonyoursite,putthemallintothesamecategoryof“contact”.TheeventswillcomethroughindividuallyinyourGoogleAnalyticsdatabecauseofhowyousetupeacheventinGTM,butyourgoalswillbestructuredinamuchmoreorganizedway. Andthereyouhaveit!That’showyoucaneasilysetupeventtrackingusingGoogleTagManager.DidIforgettomentionthatGTMisfreetouse?Therearenomonthlyoryearlyfees!Hopefully,you’velearnedsomethingtodaythatyoucangoforth,improveyourwebsite,andincreaseyourgoalconversions.Happytracking! WouldYouLiketoJoinOurMailingList? Protipssenttoyourinbox! Name* First Last Email* Bysubmittingthisformyouagreetothetermsofuseandprivacypolicyofthewebsite.Yes,makemesmarter!* You'llreceivemonthlyIronisticupdates,marketing,webdesignanddevelopmentarticles. ThissiteisprotectedbyreCAPTCHAandtheGooglePrivacyPolicyandTermsofServiceapply.EmailThisfieldisforvalidationpurposesandshouldbeleftunchanged. Let'sMakeanImpact Share PreviousArticle WebsitesofFuturePast NextArticle DigitalDistractions-Top3SitestoStayFocused RelatedInsights WebsiteDesignTipsforAssociations HowToTestWebsitePerformance 2020DigitalMarketingTrends LessonsLearnedfromOurMostChallengingProjects Comments Therearecurrently6responses. sarah June14,2018 Hi!IhaveaverypeskysitecurrentlyinSharePoint2010. I’dliketotrackuserengagementwithsomeofourdownloadableforms,andthenumberofplaysofourvideos. I’venoideawheretostart!Wecan’tuseGoogleTagManagerasitisincompatiblewithSharePoint2010. Anyideas? Thanks! Reply↓ HannahTaylor June14,2018 HiSarah, Youcametotherightplace!Youcantrackformdownloadsandvideoplaybacksusingeventtracking,asdescribedinthispost.YouwouldnotberequiredtohaveGoogletagmanagerifyouusethemethodabove,youwilljustneedtomakesureyouaddtheeventtrackingcodeintheproperplaceandbasedonwhichversionofGoogleAnalyticsyouareusing.Ifyougetstuckandneedsomeadditionalassistance,feelfreetoreachout. Reply↓ SP November20,2014 IhavegivenanexampleofTestSafewebsite.Ourwebsitealsohasseveralpageslikethiswithlotofpdfsandworddocuments(whichcanbedownloaded),soitisnotfeasibletodotheoneshowninexampleforeachandeveryURLineverypage.Sohowtotrackwordandpdfdownloadsforallthepagesinonego?IsitpossibletodothiswithonescriptinMasterpageofSharepoint?Thanks Reply↓ HannahWatkins November24,2014 AsfarasIknow,itneedstobedonemanuallyforeachURLbecausethevariablescouldbedifferentforeach.Iamnotadeveloperthough,sotherecouldbeawaytowriteascriptthatwillhelpwithsomeoftheheavylifting. Reply↓ SP November20,2014 HowdoyoutrackseveralworddocumentsandpdfdownloadsforGoogleanalyticsinajavascriptcodeinamasterpageofSharepointsite.Theonethatismentionedisforoneortwopdfsbutoursitehasplentyofworddocumentsandpdfs.Socouldyoupleasesendthecoderequiredtoaddinmasterpage Reply↓ HannahWatkins November20,2014 HiSP,canyousendmealinkofanexamplepagecontainingthedownloadlinksthatyouaretryingtotrack?Iwouldbehappytotakealookandsendyouspecificfeedback.Youcanalsofeelfreetoemailmeat[email protected]withmoreinformationifneeded. ThecodefortrackingaWordfiledownloadeventwouldbethesameastrackingaPDFfileasintheexamplesabove.Youwillneedtoidentifythecategory,action,label,value(optional)andnon-interactionastrueorfalse.ThenstructuretheeventtrackingcodeasrequiredbyyourversionofAnalyticsandinsertthecodeintothethelinkorimageelementthatwillbeclickedontostartthedownloadofthedocument. Ihopethishelps! Reply↓ LeaveaReplyCancelreplyYouremailaddresswillnotbepublished.Requiredfieldsaremarked*Comment*Name* Email* Website Savemyname,email,andwebsiteinthisbrowserforthenexttimeIcomment. Pleaseenterananswerindigits:twenty−2= RequestAQuote Let'stakeyourbusinesstothenextlevel.Fillouttheformbelowtogetstarted! "*"indicatesrequiredfields Name* First Last OrganizationEmailAddress* PhoneSignmeupforIronMail You'llreceivemonthlyIronisticupdates,marketing,webdesignanddevelopmentarticles. Message*ThissiteisprotectedbyreCAPTCHAandtheGooglePrivacyPolicyandTermsofServiceapply.EmailThisfieldisforvalidationpurposesandshouldbeleftunchanged. Submit
延伸文章資訊
- 1Google Analytics Event Tracking Made Easy - Ironistic
What types of events can I track with Google Analytics? This could be a long list. I'll cut to th...
- 2What Is Event Tracking? Data Defined - Indicative
Event tracking is used in analytics, and is defined as the tracking of events a user undertakes w...
- 3EVENT TRACKING教學– 進一步追蹤客人和你網站的互動
Google Analytics最高級的功能之一是事件追踪(Event Tracking),它讓您能夠追踪 ... 窗口要求您定義追踪類型和Google Analytics的設置,然後在Trac...
- 4Using Google Analytics Event Tracking - Hallam Internet
- 5What Are The Three Elements Of Event Tracking? - Seoczar