开发者

Google Analytics - how to track clicks on a screen?

Can I track the click of every link, button, dropdown select, etc. on a screen and 开发者_运维知识库have it be tracked in Google Analytics?

I want to create a page and collect data on which widget the users use most.

What about AJAX stuff? What if you're using jQuery or Mootools...can you get the functions to register a fake URL with GA based on user interaction? I use to do this with Flash. Everytime you click a button, it can initiate a fake URL request. I would make urls such as ".../customize/eyes/" or ".../customize/nose", etc. Just wondering if I can do that with Javascript on the page.

I've also posted at webmaster stackexchange.


Yes, you can do this, but it's not really a recommended practice, and Google might throttle your usage if there are too many clicks.

Rather than overloading your pageviews, you should use Events.

You could just bind an Event call to every click, something like (assuming jQuery)

$(document).delegate('*', 'click submit', function(){
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', Numeric_Value]);
});

You could insert whatever custom event-driven javascript info into those parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜