Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@segment/analytics.js-integration-amplitude

Package Overview
Dependencies
Maintainers
97
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics.js-integration-amplitude - npm Package Compare versions

Comparing version 2.94.2 to 2.95.0

7

lib/index.js

@@ -80,3 +80,8 @@ 'use strict';

.saveParamsReferrerOncePerSession,
deviceIdFromUrlParam: this.options.deviceIdFromUrlParam
deviceIdFromUrlParam: this.options.deviceIdFromUrlParam,
deviceId:
this.options.preferAnonymousIdForDeviceId &&
this.analytics &&
this.analytics.user() &&
this.analytics.user().anonymousId()
});

@@ -83,0 +88,0 @@

2

package.json
{
"name": "@segment/analytics.js-integration-amplitude",
"description": "The Amplitude analytics.js integration.",
"version": "2.94.2",
"version": "2.95.0",
"keywords": [

@@ -6,0 +6,0 @@ "analytics.js",

@@ -28,3 +28,4 @@ 'use strict';

traitsToIncrement: [],
traitsToSetOnce: []
traitsToSetOnce: [],
preferAnonymousIdForDeviceId: true
};

@@ -133,2 +134,3 @@

);
analytics.assert(config.deviceId === analytics.user().anonymousId());
});

@@ -142,2 +144,17 @@

describe('preferAnonymousIdForDeviceId disabled', function() {
before(function() {
options.preferAnonymousIdForDeviceId = false;
});
it('should init without anonymousId as the deviceId', function() {
var config = window.amplitude.getInstance().options;
analytics.assert(config.deviceId !== analytics.user().anonymousId());
});
after(function() {
options.preferAnonymousIdForDeviceId = true;
});
});
describe('#setDeviceId', function() {

@@ -144,0 +161,0 @@ it('should call window.amplitude.setDeviceId', function() {

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