From 81a9e210ee2b644be50924483b566f5d0b880823 Mon Sep 17 00:00:00 2001 From: alex-ju Date: Wed, 28 Feb 2018 16:36:14 +0000 Subject: [PATCH] Use custom dimensions for persistent parameters --- start.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/start.js b/start.js index 9bd37b6..4c5f17c 100644 --- a/start.js +++ b/start.js @@ -84,12 +84,21 @@ function startTracking(){ const trackingId = 'UA-2889574-13' const trackingUser = universalAnalytics(trackingId, usageDataConfig.clientId) - // Anonymise the IP - trackingUser.set('uip','1.1.1.1') const kitVersion = packageJson.version const operatingSystem = os.platform() + ' ' + os.release() - trackingUser.event("Start", kitVersion, operatingSystem).send() + const nodeVersion = process.versions.node + + // Anonymise the IP + trackingUser.set('anonymizeIp', 1) + + // Set custom dimensions + trackingUser.set('cd1', operatingSystem) + trackingUser.set('cd2', kitVersion) + trackingUser.set('cd3', nodeVersion) + + // Trigger start event + trackingUser.event('State', 'Start').send() checkFiles() }