Skip to content

Commit

Permalink
fix: airbag ab test crash if not ab profile data
Browse files Browse the repository at this point in the history
  • Loading branch information
demetriusj committed Jun 2, 2015
1 parent 50bf622 commit cc07e9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instrumentation/google-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ if(process.env.BROWSER_ENV) {
ga(sendCmd('gaEventTrackID', gaTrackID), 'event', data);
} else if(type === 'routechange') {

var statusCode = (details.pipeline.$ && details.pipeline.$.statusCode);
var url = (pellet.config.gaTrackCanonical && details.pipeline.$ && details.pipeline.$.relCanonical) || details.originalUrl;
var statusCode = (details.pipeline && details.pipeline.$ && details.pipeline.$.statusCode);
var url = (pellet.config.gaTrackCanonical && details.pipeline && details.pipeline.$ && details.pipeline.$.relCanonical) || details.originalUrl;

// report normal 2XX status codes, but for any other codes like
// 404, 500 status send them to the gaSyntheticPageUrl page for tracking
Expand Down

0 comments on commit cc07e9e

Please sign in to comment.