Search code examples
google-analyticsevent-tracking

google analytics event tracking for individual users


Hi am using google analytics ga.js to track a button click event. It is working fine. However, i want to track the button click event for individual users in my site.(eg. karthik - 5, Richard - 7 etc ) Am using wordpress. How to achieve this?


Solution

  • I have find a solution for this. I have used event tracking to achieve this. I have used the following function in the click event of the button.

    _gaq.push(['_trackEvent','button-category','Click','Clicked by the user:User id from my site ']);

    In the label field i use the logged in user id from my site. Now, i can see the clicks of a particular user using his id under Behavior->Events->Pages->Your Page->Event Category->Event Action->Event Label. As username is personally identifiable info according to google, i didn't use username.