The Nantu Standalone version is a lightweight, single JavaScript script designed to enable A/B testing without dependencies. It provides the core functionality of the full Nantu system but does not rely on specific tag manager implementations like Google Tag Manager (GTM). This makes it versatile and easy to deploy in environments where tag managers are not available or preferred.
Key Features: #
- Self-contained Script:
- It is a single JavaScript file that can be hosted and served through any content delivery method, such as embedding directly into a page, deploying via a custom tag manager, or serving as a static file.
- Test Settings via Variables:
- Developers can control the script’s behavior by configuring a set of variables at the top of the file.
- These include:
-
nantu_x_test_version
: Incremented with each test update to manage QA feedback iterations. -
nantu_x_debug
: Toggles debug logging on or off.
-
- Flexible Test Configuration:
- Define test parameters like experiment name, unique test index, and variations directly in the
data
object. - The
variations
array allows you to configure multiple test groups with specific weights.
- Device and Browser Targeting:
- Restrict tests to specific device types (desktop, tablet, or mobile) and specific browser versions using
enabledBrowserData
. - Example: Test is only enabled for Chrome Desktop (version 90 or higher).
- QA-Only Mode:
- A
qaOnly
flag can limit the test to QA environments for validation before full deployment.
- Domain and Test Window Restrictions:
- Ensure the test runs only on approved domains (
allowedDomain
) and within a specified date range (testWindowStart
andtestWindowEnd
).
Example Use Case: #
The script can be deployed to enable a test where:
- 50% of users see the control version and 50% see variation 1.
- Only Chrome Desktop users with version 90 or higher are eligible.
- The test is limited to the
localhost
domain and will be active from July 26, 2024, to December 31, 2029.
Customization: #
To update the test settings, modify the following sections in the script:
-
Experiment Details: Update
experimentName
,testIndex
, andvariations
. -
Device/Browser Settings: Adjust the
desktop
,tablet
, andmobile
flags, as well as browser-specific settings inenabledBrowserData
. -
Domain and Date Restrictions: Update
allowedDomain
,testWindowStart
, andtestWindowEnd
.
This standalone version is particularly suitable for teams looking for quick, straightforward A/B testing solutions without the complexity of integrating with external platforms.