From e2444a2e4e6b202cd2aec8ad0b19956f590ee4a4 Mon Sep 17 00:00:00 2001 From: willyb321 Date: Thu, 14 Jun 2018 06:43:54 +1000 Subject: [PATCH] track ship in ga --- src/app/Router.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/Router.js b/src/app/Router.js index be225b3f..0609a759 100644 --- a/src/app/Router.js +++ b/src/app/Router.js @@ -258,6 +258,13 @@ Route.prototype.match = function(path, params) { * @param {string} path Path to track */ function gaTrack(path) { + const match = path.match(/\/outfit\/(.*)(\?code=.*)/); + if (match[1]) { + ReactGA.ga('set', 'contentGroup1', match[1]); + } + if (match[2]) { + ReactGA.ga('set', 'contentGroup2', match[2]); + } ReactGA.pageview(path); }