开发者

Google Analytics Event Tracking As Client Side Error Log [closed]

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

Improve this question

I'm currently using Google Analytics Event Trac开发者_开发问答king to track user interface interactions in my web application.

Since our system doesn't currently have a way to log client side errors, as a quick fix I've put event tracking code in catch blocks and web service error handlers.

Does anybody else do this? Is it effective, or would you recommend something else?

Thanks


Not a bad idea! Very clever, in fact. The custom tracking tools in Analytics are just that: custom tools that you can use for whatever meets your needs.

Part of me worries that those with Javascript disabled aren't going to get reported to Analytics, but that percentage gets smaller and smaller.

On a related note: you might consider checking out the beta Analytics feature called "Intelligence." You can set up custom reports so if any numbers are abnormally high or low, it'll email you. Could be a nice way to keep an eye on how well your site is working.

An alternative would be to report the error via AJAX that spits out all the error info in an email. It works well enough for lower-traffic applications and doesn't take much to set up.


I like it! Since you can add what ever in your tracking script, it's possible to get enogh information regarding the error! Though I would categorize the errors to be able to sort them out from the "real" Google Analytics data.

We do the same in a much simpler way; having some address validation logged in GA as a page view, which can be sorted out in the content drill down.


We do this as well and track errors as a virtual page view that helps uniquely identify the script file, the line number and the error message. It works really well. If you minify your script files such that line-breaks are removed, it is not as effective though. You can find the simple code we use to implement this at https://github.com/shyam-habarakada/js-watson.

HTH.


I don't think google analytics is good tool for tracking client side errors.

Its very limited as it is not designed to track long messages as it uses image pixel tracking which is nothing more than a get request with all the information encoded as url parameters. The maximum length of a url is around 1800 character which limits the amount of information can be collected.

So its hard to collect bulky information like stacktraces, custom user information, and much more.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜