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

analytics-client

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analytics-client - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1-roman-fix-experiment-87fa997230e79f7506b69b9dab0d016c81200923

5

CHANGELOG.md

@@ -7,2 +7,7 @@ # Change Log

# v0.9.1
## (2020-06-17)
* Fix duplicate experiment values [Roman Mazur]
# v0.9.0

@@ -9,0 +14,0 @@ ## (2020-06-12)

2

dist/package.json
{
"name": "analytics-client",
"version": "0.9.0",
"version": "0.9.1-roman-fix-experiment-87fa997230e79f7506b69b9dab0d016c81200923",
"description": "Convenient builders to compose analytics tools",

@@ -5,0 +5,0 @@ "repository": {

@@ -14,2 +14,3 @@ import { Client } from './client';

private static dataString;
private static amplitudePreInsert;
private identify;

@@ -16,0 +17,0 @@ define(variation: Variation, targetPercent: number): LocalExperiment<Variation>;

@@ -29,2 +29,6 @@ "use strict";

};
LocalExperiment.amplitudePreInsert = function (identify, name, value) {
identify._addOperation('$preInsert', name, value);
return identify;
};
LocalExperiment.prototype.identify = function (result) {

@@ -34,3 +38,3 @@ if (this.analytics != null) {

.amplitude()
.identify(new amplitude_js_1.Identify().append('Experiments', this.name + "_" + result));
.identify(LocalExperiment.amplitudePreInsert(new amplitude_js_1.Identify(), 'Experiments', this.name + "_" + result));
}

@@ -37,0 +41,0 @@ };

{
"name": "analytics-client",
"version": "0.9.0",
"version": "0.9.1-roman-fix-experiment-87fa997230e79f7506b69b9dab0d016c81200923",
"description": "Convenient builders to compose analytics tools",

@@ -5,0 +5,0 @@ "repository": {

@@ -51,2 +51,13 @@ import { Identify } from 'amplitude-js';

private static amplitudePreInsert(
identify: Identify,
name: string,
value: string,
): Identify {
// XXX: $preInsert is documented but not exposed in the JS SDK.
// https://help.amplitude.com/hc/en-us/articles/205406617#keys-for-the-identification-argument
(identify as any)._addOperation('$preInsert', name, value);
return identify;
}
private identify(result: Variation) {

@@ -57,3 +68,7 @@ if (this.analytics != null) {

.identify(
new Identify().append('Experiments', `${this.name}_${result}`),
LocalExperiment.amplitudePreInsert(
new Identify(),
'Experiments',
`${this.name}_${result}`,
),
);

@@ -60,0 +75,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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