Track Events with Google Analytics

Asynchronous Complete Google Analytics with jQuery

Here is how to track all clicks on your website using google analytics asynchronously.

First in your html you need to use jQuery and a javscript file I named yga.js:

And here is the yga.js file:

Replace the: UA-XXXXXXXX-1 by your google analytics code and you’re done.

To see what occurs, simply go in Content and Event Tracking as shown in the following screenshot:

Happy tracking!