How to Set Up Google Analytics Event Tracking - Hootsuite Blog
文章推薦指數: 80 %
What is Google Analytics event tracking used for? · # of clicks on a button · # of clicks to outbound links · # of times users downloaded a file · # ... Skiptocontent Ifyouwanttotrackandrecorddatathataren’tnormallyrecordedinGoogleAnalytics,youneedtolearnhowtosetupGoogleAnalyticseventtracking. Soyou’vesetupyourwebsite. You’veplannedoutyourcontentcalendar. Andyou’veevencreatedaGoogleAnalyticsaccounttostarttrackingvitalmetricsforyourbusiness. Awesome!Butyou’reprobablyaskingyourself,“Whatnow?” Afteryou’velaidthefoundationforyourbusiness’swebsite,it’stheperfecttimetosetupGoogleAnalyticseventtracking. Thisallowsyoutotrackandrecorddatathataren’tnormallyrecordedinGoogleAnalytics—givingyouaccesstoawealthofdatayouwouldn’tbeabletootherwisemeasure. Andtherearetwowaysyoucangoaboutsettingitup: Manually.Thistakesalittlebitofextracodingknow-how. GoogleTagManager(recommended).Thisrequireslittletonocodingknowledge. Let’swalkthroughbothmethodsofsettingupGoogleAnalyticseventtracking,andlookathowexactlythetoolworks. Butfirst… Bonus:Getafreesocialmediaanalyticsreporttemplate thatshowsyouthemostimportantmetricstotrackforeachnetwork. WhatisGoogleAnalyticseventtrackingusedfor? TounderstandGoogleAnalyticseventtracking,youfirsthavetounderstandwhatan“Event”is. “Eventsareuserinteractionswithcontentthatcanbetrackedindependentlyfromawebpageorascreenload,”accordingtoGoogle.“Downloads,mobileadclicks,gadgets,Flashelements,AJAXembeddedelements,andvideoplaysareallexamplesofactionsyoumightwanttotrackasEvents.” Elementscanincludethingslikebuttons,videos,lightboxes,images,andpodcasts. SoGoogleAnalyticseventtrackingisjustthewayGAmeasuresandrecordsavarietyofdifferentmetricsrelatedtovisitorengagementwiththeseelements. Forexample,ifyouwanttoseehowmanypeopledownloadaPDFyouhaveonyourwebsite,youcansetitupsothatGoogleAnalyticsrecordsthateventeverytimeithappens. Someotherthingsyoucanrecordusingeventtracking: #ofclicksonabutton #ofclickstooutboundlinks #oftimesusersdownloadedafile #oftimesuserssharedablogpost Howmuchtimeusersspendwatchingavideo Howusersmovedtheirmouseonapage Formfieldabandonment WhenyoucoupleitwithyourGoogleAnalyticsgoals,eventtrackingcanhelpprovetheROIofamarketingcampaign. NowthatweknowexactlywhatGoogleAnalyticseventtrackingisusedfor,let’stakealookathowittrackstheevents. Howdoeseventtrackingwork? Eventtrackingleveragesacustomcodesnippetthatyouaddtotheelementsthatyouwanttotrackonyourwebsite.Wheneverusersinteractwiththatelement,thecodetellsGoogleAnalyticstorecordtheevent. Andtherearefourdifferentcomponentsthatgointoyoureventtrackingcode: Category.Thenamethatyougivetheelementsyouwanttotrack(e.g.videos,buttons,PDFs). Action.Thetypeofinteractionyouwanttorecord(e.g.downloads,videoplays,buttonclicks). Label(optional).Supplementaryinformationabouttheeventthatyou’retracking(e.g.nameofthevideousersplay,titleoftheebookusersdownload). Value(optional).Anumericalvalueyoucanassigntoatrackingelement. AlloftheaboveinformationissenttoyourGoogleAnalyticsaccountviatheeventtrackingcode. Thatmeanswhenit’sembeddedontoawebpage,it’llsendinformationandmetricsregardingtheeventyouwanttorecordbacktoyourGAaccountintheformofaneventreport. Nowthatyouhaveagoodideaaboutwhateventtrackingis—andhowitworks—let’sjumpintothetwowaysyoucansetitup. Howtosetupeventtrackingmanually Betweenthetwomethods,thisoneisthetrickiest—butbynomeansimpossible. Youdon’tneedamastersdegreeincomputerengineeringtodosomebasicbackendcodingonyourwebsite.Ifyoufollowthestepsbelow,you’llbeabletodothat(mostly)pain-free. Step1:LinkyoursitetoGoogleAnalytics SetupGoogleAnalyticsifyouhaven’talready.Ifyouneedhelpwiththat,besuretocheckoutourarticleonhowtosetupGoogleAnalytics. Onceyou’vedonethat,you’regoingtohavetofindyourGoogleAnalyticstrackingID.ThiswillbeasnippetofcodethatlinksyourGAaccountwithyourwebsite. YoucanfindthetrackingIDintheadminsectionofyouraccount. Source:Google ThetrackingIDisastringofnumbersthattellsGoogleAnalyticstosendanalyticsdatatoyou.It’sanumberthatlookslikeUA-000000-1.Thefirstsetofnumbers(000000)isyourpersonalaccountnumberandthesecondset(1)isthepropertynumberassociatedwithyouraccount. Thisisuniquetoyourwebsiteandyourpersonaldata—sodon’tsharethetrackingIDwithanyonepublicly. OnceyouhaveyourtrackingID,you’llnowhavetoaddthesnippetafterthe
tagofeachpageonyourwebsite. Ifyou’reusingWordPress,youcanmakethisprocesseveneasierbyinstallingandactivatingtheInsertHeadersandFootersplugin.ThiswillallowyoutoaddanyscripttotheHeaderandFooterthroughoutyourentirewebsite. Source:WPBeginner Step2:Addeventtrackingcodetoyourwebsite Nowit’stimetocreateandaddeventtrackingcodes. Theeventtrackingcodeismadeupofthefourelementswementionedabove(i.e.category,action,label,andvalue).Together,youusethemtocreateatrackingcodesnippetthatlookslikethis: onclick=ga(‘send’,‘event’,[eventCategory],[eventAction],[eventLabel],[eventValue]);” Simplyreplacethecategory,action,label,andvalueplaceholderswithyourowncustomizedelementsbasedontheeventsyouwanttotrack.Thenplacetheentirecodesnippetafterthehreftagonyourpagethatyouwanttotrack. Sointheend,it’lllooksomethinglikethis:延伸文章資訊
- 1Using Google Analytics Event Tracking - Hallam Internet
Google Analytics Event tracking is a useful feature in Google Analytics that allows users to reco...
- 2How To Setup Event Tracking In Google Analytics - YouTube
- 3How to Track Events with Google Analytics 4 (Updated in 2022)
- 4Google Analytics Event Tracking Tutorial - Optimize Smart
Google Analytics event tracking is an advanced feature that allows you to track a specific user's...
- 5Google Analytics Event Tracking Made Easy - Ironistic
Event tracking is the only way to identify which elements are helping you to reach your online go...