vue-multianalytics
Advanced tools
Comparing version
{ | ||
"name": "vue-multianalytics", | ||
"version": "1.11.5", | ||
"version": "1.11.7", | ||
"description": "A vue multianalytics tool", | ||
@@ -5,0 +5,0 @@ "main": "./dist/vue-multianalytics.min.js", |
@@ -47,2 +47,6 @@ | ||
debug: true, // Whether or not display console logs debugs (optional) | ||
options: { | ||
'clientId': '35009a79-1a05-49d7-b876-2b884d0f825b', | ||
'siteSpeedSampleRate': 10 | ||
} | ||
} | ||
@@ -447,2 +451,3 @@ | ||
ecommerce: true, // Enables ecommerce support (optional) | ||
config: {} // Initial GA config. Defaults to 'auto' | ||
debug: true // Whether or not display console logs debugs (optional) | ||
@@ -449,0 +454,0 @@ ``` |
@@ -42,3 +42,4 @@ import { MODULE_GA } from '../analyticsTypes' | ||
// register tracker | ||
ga('create', initConf.trackingId, 'auto') | ||
let customConfig = initConf.config || 'auto' | ||
ga('create', initConf.trackingId, customConfig) | ||
ga("set", "transport", "beacon") | ||
@@ -45,0 +46,0 @@ |
@@ -6,2 +6,16 @@ import { MODULE_MPARTICLE } from "../analyticsTypes"; | ||
const OTHER = 8; | ||
// https://github.com/mParticle/mparticle-sdk-javascript/blob/394a0663a02274fe7b148393f644f188a86f38a5/src/types.js#L88 | ||
const supportedIdentityTypes = [ | ||
'other', | ||
'customerId', | ||
'facebook', | ||
'twitter', | ||
'google', | ||
'microsoft', | ||
'yahoo', | ||
'email', | ||
'facebookCustomAudienceId', | ||
'other2', | ||
'other3', | ||
'other4'] | ||
@@ -197,3 +211,9 @@ export default class MparticleModule extends BasicModule { | ||
return new Promise((resolve, reject) => { | ||
let identityRequest = { userIdentities: userParams }; | ||
let strippedParams = { ...userParams } | ||
let notSupportedKeys = Object.keys(strippedParams).findAll(key => !supportedIdentityTypes.includes(key)) | ||
notSupportedKeys.forEach(key => { | ||
delete strippedParams[key] | ||
}) | ||
let identityRequest = { userIdentities: strippedParams }; | ||
mParticle.Identity.login(identityRequest, result => { | ||
@@ -200,0 +220,0 @@ if (result.httpCode === 200) resolve(result); |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1135970
0.07%28574
0.07%547
0.92%