
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
svelte-split-testing
Advanced tools
Run Split Tests (or A/B tests) with the power of Svelte(Kit)
Run Split Tests (or A/B tests) with the power of Svelte(Kit). Split tests (or A/B tests) allow you to display different features or variants to test their effectiveness. Unfortunately popular options are very pricey, bloated, and don't work SSR. This package attempts to remedy all of that.
This package works with Svelte and SvelteKit.
Demo and Docs: https://svelte-split-testing.playpilot.com/
Install using Yarn or NPM.
yarn add svelte-split-testing --dev
npm install svelte-split-testing --save-dev
Include the component in your app.
import { SplitTest } from "svelte-split-testing"
<SplitTest>...</SplitTest>
For more configuration refer to the documentation: https://svelte-split-testing.playpilot.com/
This is a list of all configurable properties for each component and function.
Property | Default | Description |
---|---|---|
key | 'Some Key' | Key used to identify the current Split Test. This is primary used during analytics tracking. |
variants | ['Variant A', 'Variant B'] | An array of variant names. Can be as many variants as you like. What the names are is not important, but they show up during analytics tracking. |
onView | null | Optional function to be passed to track views of the current variant. Replaces the default GTM method. |
Property | Default | Description |
---|---|---|
serverCookies | null | Cookies object as served from +layout.server.js during SSR. |
options | { userIdentifier, cookieName } | Object of configurable options |
options.userIdentifier | null | An optional user identifier to use as the identifier. This is used to show a user the same split test across different devices, as long as they have the same identifier. If an identifier was already set before the user identifier |
options.cookieName | 'splitTestIdentifier' | The name of the cookie used to store the split testing identifier. |
Property | Default | Description |
---|---|---|
options | { userIdentifier, cookieName } | Object of configurable options |
options.userIdentifier | null | An optional user identifier to use as the identifier. This is used to show a user the same split test across different devices, as long as they have the same identifier. If an identifier was already set before the user identifier |
options.cookieName | 'splitTestIdentifier' | The name of the cookie used to store the split testing identifier. |
FAQs
Run Split Tests (or A/B tests) with the power of Svelte(Kit)
The npm package svelte-split-testing receives a total of 75 weekly downloads. As such, svelte-split-testing popularity was classified as not popular.
We found that svelte-split-testing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.