Skip to content

Commit

Permalink
Track when budgets are viewed
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Cobby committed Oct 10, 2012
1 parent f341d05 commit c7bd3c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/js/routers/AppRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ TGM.Routers.AppRouter = Backbone.Router.extend({

var fetchSuccess = _.bind(function() {
TGM.vent.trigger('activeBudget', this.models.activeBudget);
if (this.models.activeBudget != this.models.userBudget) {
_gaq.push(['_trackEvent', 'Budget', 'View', this.models.activeBudget.id])
}
}, this);

if (this.models.activeBudget) {
Expand Down

0 comments on commit c7bd3c8

Please sign in to comment.