0

I have a website that hosts a javascript application. Everything runs entirely on the client side, and functions routinely get called (based on user choice) like this

<htmlelm onclick="myFunction('varA')>click</htmlelm>
<htmlelm onclick="myFunction('varB')>click</htmlelm>

These basically set a global variable (lets call it currentVar) to the string of the passed arguement and perform a few functions based on the variable.

Other functions are also called which rely on that global variable:

function loadMe() {
    currentList = currentVar + 'list';
    // currentList code etc.
}

I want to be able to track, or rather LOG all these actions for analysis. I want to be able to see which choice is most popular etc.

My webhost is GoDaddy, and they include a helpful stats page (that uses analog 6.0 / Report Magic 2.21) to display some simple information like number of requests, failed requests etc.

I also have a Google Webmaster Tools account through GoDaddy but I'm not sure exactly what it does. On a side note, is that similar to Google Analytics? Which is better?

Anyway, I want to know if there is some way for me to be able to log these events globally, and view them in a nice manner (through one of those GoDaddy tools, some sort of other web based tool, or either google product) where the result would look something like this:

when varA | loadme() called 847 times.
when varB | loadme() called 287 times.
--------------------------------------
loadme() called 1134 times.

How do I accomplish this?

turtlefeet
  • 37
  • 5
  • One solution would be to post the data with AJAX and use a backend database. Then you could have a page to display the reports you need. – andrewb Sep 23 '13 at 23:04
  • I was hoping I could either do this using html/js or a free-to-use analytics service (that would interact with the JS on the site like google analytics). – turtlefeet Sep 25 '13 at 18:38

0 Answers0