@balena/event-log
Advanced tools
Comparing version 4.1.1-fix-for-latest-vendor-ga-version-9d59332777aab6005fe5ee75ce4c7562c2e38da0 to 4.1.1-fix-for-latest-vendor-ga-version-eeb716b3c2df6ef79468c7c4b1d848291286315c
@@ -9,2 +9,3 @@ # Change Log | ||
* Update balena-config-karma to fix balenaCI tests [Thodoris Greasidis] | ||
* test: Update GA mock checks for the latest client behavior [Thodoris Greasidis] | ||
@@ -11,0 +12,0 @@ |
{ | ||
"name": "@balena/event-log", | ||
"version": "4.1.1-fix-for-latest-vendor-ga-version-9d59332777aab6005fe5ee75ce4c7562c2e38da0", | ||
"version": "4.1.1-fix-for-latest-vendor-ga-version-eeb716b3c2df6ef79468c7c4b1d848291286315c", | ||
"description": "Balena events logging util", | ||
@@ -15,7 +15,7 @@ "main": "build/balena-event-log.js", | ||
"@types/lodash": "^4.14.157", | ||
"balena-config-karma": "^2.3.1", | ||
"balena-config-karma": "^3.0.0", | ||
"browserify": "^14.0.0", | ||
"chai": "^3.5.0", | ||
"karma": "^1.7.0", | ||
"mocha": "^3.5.0", | ||
"karma": "^3.1.4", | ||
"mocha": "^3.5.3", | ||
"querystring": "^0.2.0", | ||
@@ -22,0 +22,0 @@ "resin-universal-http-mock": "^1.0.1", |
@@ -62,16 +62,11 @@ var Analytics = require('analytics-client') | ||
function validateGaData (data, event, user) { | ||
try { | ||
data = querystring.parse(data) | ||
return ( | ||
data && | ||
data.t === 'event' && | ||
data.tid === GA_ID && | ||
data.ec === GA_SITE && | ||
data.el === SYSTEM && | ||
(!event || data.ea === event) && | ||
(!user || data.uid == user.id) | ||
) | ||
} catch (e) { | ||
return false | ||
} | ||
return ( | ||
data && | ||
data.t === 'event' && | ||
data.tid === GA_ID && | ||
data.ec === GA_SITE && | ||
data.el === SYSTEM && | ||
(!event || data.ea === event) && | ||
(!user || data.uid == user.id) | ||
) | ||
} | ||
@@ -78,0 +73,0 @@ |
Sorry, the diff of this file is not supported yet
73598
1448