Universal Analytics events - Tag Manager Help
文章推薦指數: 80 %
Click Tags and then New. Click Tag Configuration and then Google Analytics - Universal Analytics. Set Track Type to Event. Enter Event Tracking Parameters:. SkiptomaincontentUniversalAnalyticsevents Note:ThisarticleisaboutUniversalAnalytics.IfyouareusingthenextgenerationofGoogleAnalytics,refertotheGoogleAnalytics4documentation. GoogleTagManagerusestriggerconfigurationstofiretagsinresponsetoevents.ThisarticleexplainshowtouseTagManagertosetupUniversalAnalyticseventtagsthataretriggeredinresponsetoclicksonlinks,clicksonothertypesofelements,attimedintervals,andwhenaformsaresubmitted. ThisarticledescribeshowtoconfigureTagManagertocreatetriggersthatlistenforcertaintypesofeventsthatareexpectedtooccuronawebpage.Formoreprecisecontrolofyourtriggerfunctionality,setupyourcodetousetriggersbasedoneventspushedtothedatalayer. Linkclicks TherearetwocommonmethodsshownhereforhowtosendclickeventinformationtoGoogleAnalytics: Useaseparatetriggerandtagforeachtypeoflink. Useasingletagwitharegularexpressiontohandleallclickdata. Fortheseexamples,wewillassumethatawebpagecontainsanavigationmenuwiththeselinknamesandURLs: Buy https://example.com/buy.html About https://example.com/about.html Contact https://example.com/contact.html Useseparatetriggersandtagstomeasureclicks Thismethodrequiresthecreationofthreetriggersandthreetags-onetrigger/tagpairforeachiteminthetableabove: AddaGoogleAnalyticspageviewtagifonedoesnotalreadyexist.Thistagmustfireonallpages. EnableTagManagertocaptureclickedURLdata: ClickVariables. IntheBuilt-InVariablessection,clickConfigure. EnablethecheckboxforClickURL. Createtriggersthatlistenforlinkclicksforbuy.html,contact.html,andabout.html: ClickTriggersNew. ClickTriggerConfigurationClick-JustLinks. Addthesesettingstothetriggerconfiguration: Waitfortags:Enable Maxwaittime:2000(milliseconds) CheckValidation:Disable Enablethistriggerwhenalloftheseconditionsaretrue:PageURLcontains/ Thistriggerfireson:SomeLinkClicksClickURLcontainsbuy.html Namethetrigger“Trigger-BuyClicks”andsavethetrigger. Repeatthesestepsfor“contact.html”and“about.html” CreatethreenewGoogleAnalyticstagstomeasureclicksforeachpage: ClickTagsNew. ClickTagConfigurationGoogleAnalytics-UniversalAnalytics. SetTrackTypetoEvent. EnterEventTrackingParameters: Category:Nav Action:Select Label:Buy NOTE:TheLabelvalueshouldcorrespondtotheparticularlinkbeingclicked(e.g."Buy"forbuy.html,"Contact"forcontact.html,and"About"forabout.html). TagName:UA-Event-BuyLink Non-InteractionHit:False GoogleAnalyticsSettings:SelectanexistingGoogleAnalyticsSettingsvariable,orcreateanewone. ClickTriggeringandselectthetriggerthatyoucreatedinstep3,titled"Trigger-BuyClicks". Givethetaganameandsavethetagconfiguration. RepeatthesestepstocreatetagsfortheContactandAboutlinks.RemembertosettheLabelvalueaccordingtothenameofthepage,e.g."Buy"forbuy.html,"Contact"forcontact.html,and"About"forabout.html Publishthecontainer. Useasingletagtomeasureclicks Youcansimplifyyourcontainerwithasingletriggerthatusesaregularexpressiontofireonthecorrectpages,andasingletagthatusesaTagManagervariablefortheLabelfield: AddaGoogleAnalyticspageviewtagifonedoesnotalreadyexist.Thistagmustfireonallpages. EnableTagManagertocaptureclickedURLvalues: ClickVariables. IntheBuilt-InVariablessection,clickConfigure. SelecttheClickURLbuilt-invariable. Createasingletriggertohandlelinkclicksforeachiteminthetableabove: ClickTriggersNew. ClickTriggerConfigurationClick-JustLinks Configurethetriggerwiththesesettings: Waitfortags:Enable Maxwaittime:2000ms CheckValidation:Disable Enablethistriggerwhenalloftheseconditionsaretrue:PageURLcontains/ Thistriggerfireson:SomeClicksClickURLmatchesRegExcontact\.html|buy\.html|about\.html Namethetrigger“Trigger-NavClicks”andsave. CreateasingleTagtohandleallclicks: ClickTagsNew. ClickTagConfigurationGoogleAnalytics-UniversalAnalytics. SetTrackTypetoEvent. CompletetheEventTrackingParameters: Category:Nav Action:Select Label:{{ClickURL}} ClickTriggeringandselectthetriggerthatyoucreatedinstep3,titled“Trigger-NavClicks”. Savethetag. Publishthecontainer. Clicksonanyelement Usethistechniquetomeasureclicksonelementsotherthanlinks.Thisincludesclicksonimages,
延伸文章資訊
- 1EVENT TRACKING教學– 進一步追蹤客人和你網站的互動
Google Analytics最高級的功能之一是事件追踪(Event Tracking),它讓您能夠追踪 ... 窗口要求您定義追踪類型和Google Analytics的設置,然後在Trac...
- 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...
- 3Google Analytics Event Tracking Set Up and Configuration
When there is an on-click event that you wish to track (e.g. a contact form submission) but you d...
- 4Event Tracking Tracker
Simple persistent tracker that logs Google Analytics 'trackEvent' calls. Primarily intended for w...
- 5What Are The Three Elements Of Event Tracking? - Seoczar