
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@noths/ab-splitter
Advanced tools
This AB-testing tool facilitates the use of AB-testing for NOTHS and relies on the ab
-cookie being set via the minymizer
tool from NOTHS. Using this tool, once your initial ab-test is set up, you will be able to enable and disable the test via Google Tag Manager (GTM).
In your app, use the AB-testing tool like so:
import ABSplitter from '@noths/ab-splitter';
const onCorrectPage = 'Add a condition here to define when AB-test should run';
if (onCorrectPage) {
const currentExperiment = new ABSplitter({
// This experiment name must be the same as the one used in the <script>
name: 'EXPERIMENT_NAME',
});
currentExperiment.submitTracking();
currentExperiment.run({
whenEnabled: () => {
console.log('AB-Test enabled');
},
whenDisabled: () => {
console.log('AB-Test disabled');
},
});
}
Add the following snippet with the correct data to GTM to enable the AB-test:
<script>
const experimentName = 'EXPERIMENT_NAME';
window.__NOTHS_ABTEST_EXPERIMENT_DATA = window.__NOTHS_ABTEST_EXPERIMENT_DATA || {};
window.__NOTHS_ABTEST_EXPERIMENT_DATA[experimentName] = {
// Enable and disable the ab-test here
isEnabled: true,
// You can get this ID from the Google Experiments Section in Google Analytics
id: 'EXPERIMENT_ID',
variants: {
// Use the ticket number for reference, this should be the same as the values
// used in the Google Experiments Section in Google Analytics
control: 'TICKET_NUMBER.0',
experiment: 'TICKET_NUMBER.1',
},
// Optional: To change how to split the traffic, send an array with 8 unique numbers between 0-15
// Default: [8,9,10,11,12,13,14,15]
variantBucketNumbers: [1, 3, 5, 7, 9, 11, 13, 15],
};
</script>
Important
The methods run
and submitTracking
must only be used after GTM has run on the page!
Otherwise the necessary values from __NOTHS_ABTEST_EXPERIMENT_DATA
that are depenent on GTM will not be available and the AB-test will not run.
# Install dependencies
npm i
# Create a build for the client
npm run build
This package can be used only on the client.
FAQs
### Description
We found that @noths/ab-splitter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 33 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.