Angular Directives for Google Analytics Tracking
var app = angular.module("app", ["ga.tracker"]);
When the directive is used, it registers a page view at the current $location.path();. I like to add it once in each of my templates.
<div class="home-template" ga-pageview tracking-id="XX-XXXXXXXX-XX">
When you add the diretive to an HTML element and that element is clicked, the event will be registered with GA.
<a href="/#/prizes" ga-event event-name="some event" event-value="some value" tracking-id="XX-XXXXXXXX-XX">Submit Event!</a>