From 3eec4cda23b71985d431fcc4b9612b03d8d20f8c 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..6b5e17a 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', 'Application started').send() checkFiles() }