mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
track ship in ga
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user