Skip to content

Instantly share code, notes, and snippets.

@justinboyle
Created October 30, 2013 21:40
Show Gist options
  • Save justinboyle/7240828 to your computer and use it in GitHub Desktop.
Save justinboyle/7240828 to your computer and use it in GitHub Desktop.
/assets/html/javascript/checkout/lite
Checkout.ApplicationController.reopen({
// Virtual Pageviews
routeChanged: function() {
console.log('inside');
Ember.run.next(function() {
analytics.pageview('/checkout/cc/#/' + this.currentPath);
var uri;
if(this.currentPath === 'addresses'){
uri = 'https://www.footsmart.com/OrderAddressInformation.aspx';
} else if(this.currentPath === 'payment'){
uri = 'https://www.footsmart.com/OrderShippingMethod.aspx';
} else if(this.currentPath === 'confirm'){
uri = 'https://www.footsmart.com/OrderShippingMethod.aspx';
} else if(this.currentPath === 'receipt'){
uri = 'https://www.footsmart.com/OrderReview.aspx';
}
App.analytics.getAnalyticScripts(uri);
}.bind(this));
}.observes('currentPath')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment