javascript - Display category of event tracking data in GA -
i have question, want add new category in event tracking data in ga, added script ga.js, , in js when press on button :
ga._trackevent('game','play',value); i looked in console network of browser, script have state 200 ok, properties of script :
utmac ua-1xxxx-1 utmcs utf-8 utmdt games utme 5(game*play*golf) .............. the problem category not added in google analytics. in audience>cutom>custom variables. can me please? i'm doing wrong? thx in advance
i think mixing few things here.
- you have added code event tracking
- you talking checking custom variables (audience>cutom>custom variables)
- you talk categories.
lets take them 1 @ time.
event tracking:
event tracking when user clicks on button event can track button click in google analytics adding event tracking tag button click
<a onclick="_trackevent('button', 'click', 'linktohome');" href="http://www.home.com">home</a> google analytics should store hit under behavior -> events -> overview
custom varables
custom variables name-value pair tags can insert in tracking code in order refine google analytics tracking.
if have blog site , have different authors on blog site, might create custom variable author name track in google analytics author blog post.
custom variables must set in admin section of google analytics website each variable has index id.
_setcustomvar("1", "author", "jane doe"); this tag added @ top of page along side normal google analytics snippet.
custom variables can seen (audience>cutom>custom variables)
catagorie
now categories associated event can seen @
behavior -> events -> overview update:
the signature of _trackevent() method follows:
_trackevent(category, action, opt_label, opt_value, opt_noninteraction) - category (required) name supply group of objects want track.
- action (required) string uniquely paired each category, , commonly used define type of user interaction web object.
- opt_label (optional) optional string provide additional dimensions event data.
- opt_value (optional) integer can use provide numerical data user event.
- opt_noninteraction (optional) boolean when set true, indicates event hit not used in bounce-rate calculation.
Comments
Post a Comment