Crawl navigation with unique page analytics that has JavaScript navigation

7

I recently created a personal page and would like to track the most visited areas of the site. The problem is that the page is made up of a single file (ex: index.html) and navigation is all done in JavaScript, that is, the page loads only once. Is there any way in Google Analytics to track users' browsing according to the menu navigation?

    
asked by anonymous 12.03.2014 / 14:17

1 answer

9

Google Analytics has an Event Tracking system that, I believe, applies to your needs. The details are here:

link

You add a line at the point you want to measure by creating an event (for example, a click on a top menu item).

If you use ga.js, it looks like this:

_gaq.push(['_trackEvent', 'clique-no-menu', 'menu-superior', 'resumo']);

If you use the new analytics.js, it looks like this:

ga('send', 'event', 'button', 'click', 'menu-superior', 'resumo');

Then just go to the Event Tracking portion of Google Analytics and set up your review.

Note: If you are open to other options, I recommend the Mixpanel , which was done just for this. The idea is the same as the Google Analytics Event Tracker, but in particular, I find it much simpler and more intuitive.

    
12.03.2014 / 14:34