Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Enable GA debugging in the main path in the server (other paths were …
Browse files Browse the repository at this point in the history
…already

covered)
  • Loading branch information
ianb committed Dec 14, 2016
1 parent d331fdd commit dad81e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ app.use(function (req, res, next) {
req.deviceId = cookies.get("user", {signed: true});
if (req.deviceId) {
req.userAnalytics = ua(config.gaId, req.deviceId, {strictCidFormat: false});
if (config.debugGoogleAnalytics) {
req.userAnalytics = req.userAnalytics.debug();
}
}
req.backend = `${req.protocol}://${req.headers.host}`;
req.config = config;
Expand Down

0 comments on commit dad81e9

Please sign in to comment.