Skip to content

Commit

Permalink
Updating utility code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwilcox committed May 2, 2018
1 parent 4cb2c3b commit fa1d5b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils.js
Expand Up @@ -28,7 +28,7 @@ exports.storeReferrer = function storeReferrer(req, res, redirect, optionalReaso
if (redirect) {
eventDetails.redirect = redirect;
if (req.insights) {
req.insights.trackEvent('RedirectWithReferrer', eventDetails);
req.insights.trackEvent({ name: 'RedirectWithReferrer', properties: eventDetails });
}
res.redirect(redirect);
}
Expand All @@ -49,7 +49,7 @@ exports.redirectToReferrer = function redirectToReferrer(req, res, url, optional
reason: optionalReason || 'unknown reason',
};
if (req.insights) {
req.insights.trackEvent('RedirectToReferrer', eventDetails);
req.insights.trackEvent({ name: 'RedirectToReferrer', properties: eventDetails });
}
res.redirect(alternateUrl || url);
};
Expand All @@ -66,7 +66,7 @@ function storeOriginalUrlAsVariable(req, res, variable, redirect, optionalReason
}
if (redirect) {
if (req.insights) {
req.insights.trackEvent('RedirectFromOriginalUrl', eventDetails);
req.insights.trackEvent({ name: 'RedirectFromOriginalUrl', properties: eventDetails });
}
res.redirect(redirect);
}
Expand Down

0 comments on commit fa1d5b6

Please sign in to comment.