Socket
Socket
Sign inDemoInstall

@mparticle/web-google-analytics-kit

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mparticle/web-google-analytics-kit - npm Package Compare versions

Comparing version 2.0.0-rc.2 to 2.0.1-rc.2

CHANGELOG.md

62

dist/GoogleAnalyticsEventForwarder.common.js
Object.defineProperty(exports, '__esModule', { value: true });
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
function isObject(val) {
return val != null && typeof val === 'object' && Array.isArray(val) === false;
}
/* eslint-disable no-undef*/

@@ -30,6 +19,5 @@ //

var name = 'GoogleAnalyticsEventForwarder',
moduleId = 6,
version = '2.0.1',
MessageType = {

@@ -103,6 +91,6 @@ SessionStart: 1,

function applyCustomDimensionsMetricsForSourceAttributes(attributes, targetDimensionsAndMetrics, mapLevel) {
for (var cdKey in mapLevel.customDimensions) {
for (var customDimension in mapLevel.customDimensions) {
for (attrName in attributes) {
if (mapLevel.customDimensions[cdKey] === attrName) {
targetDimensionsAndMetrics[cdKey] = attributes[attrName];
if (customDimension === attrName) {
targetDimensionsAndMetrics[mapLevel.customDimensions[customDimension]] = attributes[attrName];
}

@@ -112,6 +100,6 @@ }

for (var cmKey in mapLevel.customMetrics) {
for (var customMetric in mapLevel.customMetrics) {
for (attrName in attributes) {
if (mapLevel.customMetrics[cmKey] === attrName) {
targetDimensionsAndMetrics[cmKey] = attributes[attrName];
if (customMetric === attrName) {
targetDimensionsAndMetrics[mapLevel.customMetrics[customMetric]] = attributes[attrName];
}

@@ -418,9 +406,2 @@ }

function checkForDuplicateMapping(dimensionOrMetric, eventLevelMap) {
var existingMapper = eventLevelMap['customDimensions'][formatDimensionOrMetric(dimensionOrMetric.value)];
if (existingMapper) {
console.log('Warning: both ' + existingMapper + ' & ' + dimensionOrMetric.map + ' are mapped to ' + dimensionOrMetric.value + '. ' + dimensionOrMetric.map + ' is replacing ' + existingMapper + '. If this is a mistake, please revisit the Google Analytics settings at app.mparticle.com. Otherwise, please ignore this warning.');
}
}
function initForwarder(settings, service, testMode, tid) {

@@ -496,10 +477,7 @@ try {

if (dimension.maptype === 'EventAttributeClass.Name') {
checkForDuplicateMapping(dimension, eventLevelMap);
eventLevelMap['customDimensions'][formatDimensionOrMetric(dimension.value)] = dimension.map;
eventLevelMap['customDimensions'][dimension.map] = formatDimensionOrMetric(dimension.value);
} else if (dimension.maptype === 'UserAttributeClass.Name') {
checkForDuplicateMapping(dimension, userLevelMap);
userLevelMap['customDimensions'][formatDimensionOrMetric(dimension.value)] = dimension.map;
userLevelMap['customDimensions'][dimension.map] = formatDimensionOrMetric(dimension.value);
} else if (dimension.maptype === 'ProductAttributeSelector.Name') {
checkForDuplicateMapping(dimension, productLevelMap);
productLevelMap['customDimensions'][formatDimensionOrMetric(dimension.value)] = dimension.map;
productLevelMap['customDimensions'][dimension.map] = formatDimensionOrMetric(dimension.value);
}

@@ -513,10 +491,7 @@ });

if (metric.maptype === 'EventAttributeClass.Name') {
checkForDuplicateMapping(metric, eventLevelMap);
eventLevelMap['customMetrics'][formatDimensionOrMetric(metric.value)] = metric.map;
eventLevelMap['customMetrics'][metric.map] = formatDimensionOrMetric(metric.value);
} else if (metric.maptype === 'UserAttributeClass.Name') {
checkForDuplicateMapping(metric, userLevelMap);
userLevelMap['customMetrics'][formatDimensionOrMetric(metric.value)] = metric.map;
userLevelMap['customMetrics'][metric.map] = formatDimensionOrMetric(metric.value);
} else if (metric.maptype === 'ProductAttributeSelector.Name') {
checkForDuplicateMapping(metric, productLevelMap);
productLevelMap['customMetrics'][formatDimensionOrMetric(metric.value)] = metric.map;
productLevelMap['customMetrics'][metric.map] = formatDimensionOrMetric(metric.value);
}

@@ -544,2 +519,6 @@ });

function isObject(val) {
return val != null && typeof val === 'object' && Array.isArray(val) === false;
}
function register(config) {

@@ -578,7 +557,12 @@ if (!config) {

var GoogleAnalyticsEventForwarder = {
register: register
register: register,
getVersion: function() {
return version;
}
};
var GoogleAnalyticsEventForwarder_1 = GoogleAnalyticsEventForwarder.register;
var GoogleAnalyticsEventForwarder_2 = GoogleAnalyticsEventForwarder.getVersion;
exports.default = GoogleAnalyticsEventForwarder;
exports.getVersion = GoogleAnalyticsEventForwarder_2;
exports.register = GoogleAnalyticsEventForwarder_1;
{
"name": "@mparticle/web-google-analytics-kit",
"version": "2.0.0-rc.2",
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
"description": "mParticle integration sdk for Google Analytics",
"browser": "dist/GoogleAnalyticsEventForwarder.common.js",
"files": [
"dist/GoogleAnalyticsEventForwarder.common.js"
],
"repository": "https://github.com/mparticle-integrations/mparticle-javascript-integration-google-analytics",
"scripts": {
"build": "rollup --config rollup.config.js",
"watch": "rollup --config rollup.config.js -w"
},
"devDependencies": {
"should": "^7.1.0",
"mocha": "^2.3.2",
"rollup": "^1.13.1",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.1"
},
"dependencies": {
"isobject": "^4.0.0",
"@mparticle/web-sdk": "^2.9.4-rc.1"
},
"license": "Apache-2.0"
"name": "@mparticle/web-google-analytics-kit",
"version": "2.0.1-rc.2",
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
"description": "mParticle integration sdk for Google Analytics",
"browser": "dist/GoogleAnalyticsEventForwarder.common.js",
"files": [
"dist/GoogleAnalyticsEventForwarder.common.js"
],
"repository": "https://github.com/mparticle-integrations/mparticle-javascript-integration-google-analytics",
"scripts": {
"build": "rollup --config rollup.config.js",
"watch": "rollup --config rollup.config.js -w"
},
"devDependencies": {
"should": "^7.1.0",
"mocha": "^2.3.2",
"rollup": "^1.13.1",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.1",
"eslint": "^6.4.0",
"eslint-config-prettier": "6.3.0",
"eslint-plugin-prettier": "3.1.1",
"prettier": "1.18.2"
},
"dependencies": {
"@mparticle/web-sdk": "^2.9.13-rc.1"
},
"license": "Apache-2.0"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc