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

@ludens-reklame/profiler-client

Package Overview
Dependencies
Maintainers
9
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ludens-reklame/profiler-client - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

39

dist/Profiler.js
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -52,3 +41,3 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

var cookies = require("js-cookie");
var profilerURL = 'https://api.profiler.marketing';
var PROFILER_URL = 'https://api.profiler.marketing';
var PERSONALIZATION_CLASS_NAME = '__prfPrs';

@@ -194,3 +183,3 @@ var COOKIE_KEY = '__pid';

};
return [4 /*yield*/, fetch(profilerURL + "/personalization?" + qs.stringify(query), {
return [4 /*yield*/, fetch(PROFILER_URL + "/personalization?" + qs.stringify(query), {
mode: 'cors',

@@ -224,3 +213,4 @@ credentials: 'include'

window &&
'location' in window)) return [3 /*break*/, 2];
'location' in window &&
!this.pid)) return [3 /*break*/, 2];
firstParty = window.location.href;

@@ -363,3 +353,3 @@ thirdParty = document.referrer;

}
url = profilerURL + "/" + endpoint;
url = PROFILER_URL + "/" + endpoint;
if (!asJSON) {

@@ -417,8 +407,19 @@ url = url + ("?" + qs.stringify(data));

this.pageView.exit = new Date();
var endpoint = 'organizations/' + this.organization + '/page-views/push';
if (!!navigator && 'sendBeacon' in navigator) {
navigator.sendBeacon(endpoint, qs.stringify(__assign(__assign({}, this.pageView), { firstParty: window.location.href, thirdParty: document.referrer, ref: this.pid })));
if (!!navigator &&
'sendBeacon' in navigator &&
typeof this.pid === 'string') {
var endpoint = PROFILER_URL +
'/organizations/' +
this.organization +
'/page-views/push';
var data = new FormData();
data.append('ref', this.pid);
for (var key in this.pageView) {
if (this.pageView.hasOwnProperty(key)) {
data.append(key, this.pageView[key]);
}
}
navigator.sendBeacon(endpoint, data);
}
this.pageView = undefined;
this.handlePersonalizations();
}

@@ -425,0 +426,0 @@ };

{
"name": "@ludens-reklame/profiler-client",
"version": "2.3.1",
"version": "2.3.2",
"description": "Profiler for all",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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