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

landing-page-experiments

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

landing-page-experiments - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

test/page.js

16

dist/index.js

@@ -57,3 +57,3 @@ "use strict";

},
getExperimentConfig: function (apiKey, experimentName) {
getExperimentConfig: function (apiKey, experimentId) {
return __awaiter(this, void 0, void 0, function () {

@@ -78,3 +78,3 @@ var sid, resp;

},
configName: experimentName,
configName: experimentId,
}),

@@ -100,5 +100,5 @@ })];

},
performRedirect: function (apiKey, experimentName) {
performRedirect: function (apiKey, experimentId) {
var _this = this;
this.getExperimentConfig(apiKey, experimentName)
this.getExperimentConfig(apiKey, experimentId)
.then(function (config) {

@@ -117,1 +117,9 @@ var _a;

};
if (document.currentScript && document.currentScript.src) {
var url = new URL(document.currentScript.src);
var apiKey = url.searchParams.get('apikey');
var expId = url.searchParams.get('expid');
if (apiKey && expId) {
StatsigABHelper.performRedirect(apiKey, expId);
}
}
{
"name": "landing-page-experiments",
"version": "1.0.10",
"version": "1.0.11",
"description": "Statsig helps run landing page experiments by redirecting users to two or more landing pages based on an ABn Test.",

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

@@ -23,3 +23,3 @@ window["StatsigABHelper"] = window["StatsigABHelper"] || {

getExperimentConfig: async function(apiKey, experimentName) {
getExperimentConfig: async function(apiKey, experimentId) {
const sid = this.getStableID();

@@ -39,3 +39,3 @@ const resp = await fetch('https://featuregates.org/v1/get_config', {

},
configName: experimentName,
configName: experimentId,
}),

@@ -58,4 +58,4 @@ });

performRedirect: function(apiKey, experimentName) {
this.getExperimentConfig(apiKey, experimentName)
performRedirect: function(apiKey, experimentId) {
this.getExperimentConfig(apiKey, experimentId)
.then(config => {

@@ -72,2 +72,11 @@ const url = config?.value?.page_url;

}
}
if (document.currentScript && document.currentScript.src) {
const url = new URL(document.currentScript.src);
const apiKey = url.searchParams.get('apikey');
const expId = url.searchParams.get('expid');
if (apiKey && expId) {
StatsigABHelper.performRedirect(apiKey, expId);
}
}

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