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

Commit

Permalink
Use custom dimensions for persistent parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ju committed Mar 1, 2018
1 parent d8b51e8 commit 81a9e21
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions start.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 81a9e21

Please sign in to comment.