开发者

Capturing, logging and running analytics on Javascript events

What are good libraries开发者_Go百科/platforms out there for capturing, logging and running analytics on Javascript events? Preferably open-source...


I think Google Analytics would do the job using custom variables. Here is a snippet of code used to log a custom variable...with commenting:

_gaq.push(['_setCustomVar',
  1,                   // This custom var is set to slot #1.  Required parameter.
  'Section',           // The top-level name for your online content categories.  Required parameter.
  'Life & Style',  // Sets the value of "Section" to "Life & Style" for this particular aricle.  Required parameter.
  3                    // Sets the scope to page-level.  Optional parameter.
]);

...without commenting:

_gaq.push(['_setCustomVar', 1, 'Section', 'Life & Style', 3]);

The above is taken from a page on Google's website http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html - definitely worth a look.

The best part is that custom variables can be viewed in the same way page visitors etc can be viewed, on the same graph in fact. Take a look: http://techpad.co.uk/custom/images/medium/4debdf844cf3b.jpg

I hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜