New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@segment/analytics.js-integration-segmentio

Package Overview
Dependencies
Maintainers
21
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 3.3.0-beta2 to 3.3.0-beta3

18

lib/index.js

@@ -96,2 +96,3 @@ 'use strict';

if (!crossDomainId) {
var currentTld = getTld(window.location.hostname);
var domains = this.options.crossDomainIdServers;

@@ -103,2 +104,6 @@ var writeKey = this.options.apiKey;

var domain = domains[i];
if (getTld(domain) === currentTld) {
finishedRequests++;
continue;
}
var endpoint = 'https://' + domain + '/v1/id/';

@@ -120,3 +125,5 @@ // For v0 we're just gonna grab the first id that came back

});
onCrossDomainIdReady(crossDomainId);
if (onCrossDomainIdReady) {
onCrossDomainIdReady(crossDomainId);
}
} else if (finishedRequests === domains.length) {

@@ -133,3 +140,5 @@ // So all requests have finished but we still did not find a crossDomainId, let's just set one now

});
onCrossDomainIdReady(crossDomainId);
if (onCrossDomainIdReady) {
onCrossDomainIdReady(crossDomainId);
}
}

@@ -386,2 +395,7 @@ });

xhr.send();
}
// Get domain.com from subdomain.domain.com, etc.
function getTld(domain) {
return domain.split('.').splice(-2).join('.');
}

2

package.json
{
"name": "@segment/analytics.js-integration-segmentio",
"description": "The Segmentio analytics.js integration.",
"version": "3.3.0-beta2",
"version": "3.3.0-beta3",
"keywords": [

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

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