You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@ninetailed/experience.js-plugin-analytics

Package Overview
Dependencies
Maintainers
3
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ninetailed/experience.js-plugin-analytics - npm Package Compare versions

Comparing version
7.18.12-alpha.3
to
7.18.13
+1
index.esm.d.ts
export * from "./src/index";
+0
-2
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var radash = require('radash');

@@ -6,0 +4,0 @@ var experience_jsShared = require('@ninetailed/experience.js-shared');

@@ -12,3 +12,2 @@ import { isEqual } from 'radash';

});
// Element specific schema

@@ -58,6 +57,7 @@ const ElementSeenPayloadSchema = BaseSeenPayloadSchema.extend({

var _a$1, _b;
class NinetailedPlugin {
constructor() {
this.componentViewTrackingThreshold = 0;
this[HAS_SEEN_ELEMENT] = event => {
this[_a$1] = event => {
if (event.payload.seenFor !== this.getComponentViewTrackingThreshold()) {

@@ -68,3 +68,3 @@ return;

};
this[HAS_SEEN_VARIABLE] = event => {
this[_b] = event => {
this.onHasSeenVariable(event);

@@ -82,14 +82,12 @@ };

}
_a$1 = HAS_SEEN_ELEMENT, _b = HAS_SEEN_VARIABLE;
var _a;
const TEMPLATE_OPTIONS = {
interpolate: /{{([\s\S]+?)}}/g
};
/**
* This type is only used for the `onTrackExperience` method that is implemented in subclasses of `NinetailedAnalyticsPlugin`.
*/
class NinetailedAnalyticsPlugin extends NinetailedPlugin {
constructor(hasSeenExperienceEventTemplate = {}) {
super();
this.hasSeenExperienceEventTemplate = hasSeenExperienceEventTemplate;
this.seenElements = new WeakMap();

@@ -115,3 +113,3 @@ this.seenVariables = new Map();

};
return Object.assign({}, acc, {
return Object.assign(Object.assign({}, acc), {
[key()]: value()

@@ -180,3 +178,2 @@ });

});
// Should we track it once or multiple times if it is the same payload?

@@ -187,3 +184,2 @@ if (isVariableAlreadySeenWithPayload) {

this.seenVariables.set(variableKey, [...variablePayloads, sanitizedTrackVariableProperties]);
// TODO: this does nothing for now, we need to implement how track variables to 3rd party plugins

@@ -194,3 +190,3 @@ };

*/
this[HAS_SEEN_COMPONENT] = ({
this[_a] = ({
payload

@@ -205,5 +201,5 @@ }) => {

};
this.hasSeenExperienceEventTemplate = hasSeenExperienceEventTemplate;
}
}
_a = HAS_SEEN_COMPONENT;

@@ -210,0 +206,0 @@ const hasComponentViewTrackingThreshold = arg => {

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "7.18.12-alpha.3",
"version": "7.18.13",
"keywords": [

@@ -33,3 +33,3 @@ "analytics",

"@anatine/zod-mock": "3.8.1",
"@ninetailed/experience.js-shared": "7.18.12-alpha.3",
"@ninetailed/experience.js-shared": "7.18.13",
"analytics": "0.8.1",

@@ -36,0 +36,0 @@ "radash": "10.9.0",