/**
 * Event tracker (analytics)
 */

var module = angular.module('tracker', []);
var mixpanel;

module.factory('rpTracker', ['$rootScope', function ($scope) {
  var track = function (event,properties) {
    if (Options.mixpanel && Options.mixpanel.track && mixpanel) {
      mixpanel.track(event,properties);
    }
  };

  return {
    track: track
  };
}]);

/**
 * Event tracker (analytics)
 */

var module = angular.module('tracker', []);

module.factory('rpTracker', ['$rootScope', function ($scope) {
  var track = function (event,properties) {
    console.log('track?',Options.mixpanel, Options.mixpanel.track, typeof mixpanel !== 'undefined');
    if (Options.mixpanel && Options.mixpanel.track && mixpanel) {
      console.log('track');
      mixpanel.track(event,properties);
    }
  };

  return {
    track: track
  };
}]);

Check if variable is defined.
Tracker: Check if variable is defined.
