Universal Analytics events - Tag Manager Help

文章推薦指數: 80 %
投票人數:10人

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,

elements,oranyotheritemonthepageaccessiblebytheDOM.Forthisexample,eachimagehasaclassattributevalueofgalleryandauniqueIDattributevalueforeachimage: Inthisexample,weusetheseattributestoconfigureatriggerthatfiresonimagetagswithclass="gallery",andusethattriggertofireatagthatsendstherespectiveIDvalues(e.g.Golden_Gate_Bridge,Taj_Mahal)toGoogleAnalytics: AddaGoogleAnalyticspageviewtagifonedoesnotalreadyexist.Thistagmustfireonallpages. EnableTagManagertocaptureclickedclassandIDvalues: ClickVariables. IntheBuilt-InVariablessection,clickConfigure. SelecttheClickClassesandClickIDbuilt-invariables. Createanewtriggerthatfireswhenalinkhasaclassattributevalueofgallery: ClickTriggersNew. ClickTriggerConfiguration​Click-AllElements. Enablethistriggerwhenalloftheseconditionsaretrue:PageURLcontains/ Thistriggerfireson:SomeClicksClickClassescontainsgallery. Savethetriggerandnameit"Trigger-GalleryImageClick"whenprompted. CreateatagtocapturetheIDattributevaluesforaclickedimage: ClickTagsNew. ClickTagConfigurationUniversalAnalytics. SetTrackTypetoEvent. CompletetheEventTrackingParameters: Category:ImageGallery Action:Click Label:{{ClickID}} Note:thecurlybracesareusedintextfieldsandcustomcodetoreplaceavalidTagManagervariablenamewiththerelevantvalueretrievedfromtheevent. Non-InteractionHit:False GoogleAnalyticsSettings:SelectanexistingGoogleAnalyticsSettingsvariable,orcreateanewoneifnecessary. ClickTriggeringandselectthetriggerthatyoucreatedinstep3,titled"Trigger-GalleryImageClick". Savethetagas"GA-EventTag-GalleryImageClick". Publishthecontainer. Timedintervals Implementationoftimedintervaltagsmayinfluencebounceratereportssuchthatthenumbersmayappearlowerthanexpected. Measuretimedintervalswhenyouneedtounderstandtimeonpagewhennoeventsaretriggered.Thismightincludeuserswhoreadtextorplayvideoonthepage.Additionally,giventhatGoogleAnalyticssessionstimeoutafter30minutesbydefault,youmaywishtoimplementa‘keepaliveevent’toensurethatanactivityissentevery25minutes. Toconfigureatagthatmeasurestimedintervals: AddabasicGoogleAnalyticspageviewtagifonedoesnotalreadyexist.Thistagmustfireonallpages. CreateaTimerTrigger: ClickTriggersNew. ClickTriggerConfigurationTimer. ​Addthesesettingstothetriggerconfiguration: EventName:gtm.timer Interval:1500000(calculatedinmilliseconds) Limit:5 Enablethistriggerwhenalloftheseconditionsaretrue:PageURLcontainsvideo.html Thistriggerfireson:AllTimers SavetheTriggeras“Trigger-SessionTimer" Createasessiontimertag: ClickTagsNew. ClickTagConfigurationUniversalAnalyticsandaddthesesettingstothetagconfiguration: Tracktype:Timing UserTimingTrackingParameters:Leaveblankoraddvaluesasdesiredforyourreports. ClickTriggeringandselectthetriggerthatyoucreatedinstep2,titled“Trigger-SessionTimer”. Publishthecontainer. Formsubmits Thistechniquewillcauseatagtofireeverytimeaformonawebpageissubmitted.Thisexampleassumesthe
HTMLtagcontainsanIDattributewithavalueof"contact_us": WecanusethisIDtocreateatriggerthatwilllistenforwhenthisformissubmitted: AddabasicGoogleAnalyticspageviewtagifonedoesnotalreadyexist.Thistagmustfireonallpages. EnableTagManagertocaptureformIDs: ClickVariables. ClickConfigureintheBuilt-InVariablessection. SelecttheFormIDbuilt-invariable. Createaformsubmittrigger: ClickTriggersNew. ClickTriggerConfigurationFormSubmission. Addthesesettingstothetriggerconfiguration: WaitforTags:Disable CheckValidation:Disable Enablethistriggerwhenalloftheseconditionsaretrue:PageURLcontains/ Thistriggerfireson:SomeFormsFormIDcontainscontact_us Savethetriggeras“Trigger-MyFormSubmits”. Createthetagtomeasureformsubmits: ClickTagsNew. ClickTagConfigurationUniversalAnalytics. SetTrackTypetoEvent. FillintheEventTrackingParameters: Category:Forms Action:Submit Label:LeadGen-{{FormID}} Note:thecurlybracesareusedintextfieldsandcustomcodetoreplaceavalidTagManagervariablenamewiththerelevantvalueretrievedfromtheevent. Non-InteractionHit:False GoogleAnalyticsSettings:SelectanexistingGoogleAnalyticsSettingsvariable,orcreateanewone. ClickTriggeringandselectthetriggerthatyoucreatedinstep3,titled“Trigger-MyFormSubmits”. Savethetagas"GA-EventTag-FormSubmits". Publishthecontainer. Relatedresources DeployGoogleAnalyticswithTagManager GoogleAnalyticscustomdimensions GoogleAnalyticsContentGroups MeasurementwithuserIDs GoogleAnalyticsecommerce Measureuseractivity acrossdomains GoogleAnalyticsdynamicremarketing GoogleAnalyticshelpcenter:AboutGoogleAnalyticsevents Wasthishelpful?Howcanweimproveit?YesNoSubmittrueGoogleAnalyticsGoogleAnalytics4tagsDeployUniversalAnalyticswithTagManagerUniversalAnalyticseventsUniversalAnalyticscustomdimensionsGoogleAnalyticsContentGroupsTheGoogleAnalyticsuserIDUniversalAnalyticsecommerceMeasureactivityacrossdomainsUniversalAnalyticsdynamicremarketingGoogleAnalyticsformobileappsGoogleAnalyticssettingsvariableSearchClearsearchClosesearchGoogleappsMainmenuSearchHelpCentertrue102259falsefalse


請為這篇文章評分?