star cross menu chevron-down

Standalone Test

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: #

  1. 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.
  1. 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.
  1. 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.
  1. 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).
  1. QA-Only Mode:
  • A qaOnly flag can limit the test to QA environments for validation before full deployment.
  1. Domain and Test Window Restrictions:
  • Ensure the test runs only on approved domains (allowedDomain) and within a specified date range (testWindowStart and testWindowEnd).

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, and variations.
  • Device/Browser Settings: Adjust the desktop, tablet, and mobile flags, as well as browser-specific settings in enabledBrowserData.
  • Domain and Date Restrictions: Update allowedDomain, testWindowStart, and testWindowEnd.

This standalone version is particularly suitable for teams looking for quick, straightforward A/B testing solutions without the complexity of integrating with external platforms.

Doc Feedback
Updated on December 7, 2024