Skip to content

Tag Archives: Google Analytics

Google Analytics and Angular UI Router


Tracker service: (function () { 'use strict'; angular .module('app.core') .service('googleAnalyticsTracker', googleAnalyticsTracker); googleAnalyticsTracker.$inject = ['$state', '$window']; function googleAnalyticsTracker($state, $window) { /* jshint validthis: true */ this.trackState = trackState; //////////////// function trackState() { var stateName = $; var path = stateName.replace(/\./g, '/'); // replaces dots to mimic regular path with slashes $'set', 'page', path); $'send', 'pageview'); } […]

[Google Analytics] Track to Two Profiles the Async Way


The new asynchronous tracking in Google Analytics requires new code as well. If you need to track more than one profile, this is how you do it.

Google Analytics Tracking to Multiple Profiles


Sometimes you need to use many Analytics site profiles to track the same information, for any reason. One instance is using tools like SEO Position Plus which may require a profile of its own. Here's one way to do it with the new tracking code (not the legacy tracking, for that see this thread). <script […]