๐ŸŽ›๏ธHow to Set Up an Advanced Test using our JavaScript API

Intelligems allows you to set up powerful custom tests using its window object API.

Step 1: Create a new test

Navigate to the "A/B Tests" tab in the menu on the left-hand side of the Intelligems app. Once there, click 'Create New Test' above the experiments table. Select "Content Test" , then "Advance", then "Create Test".

Step 2: Create your test groups

Create a test group for each theme you want to include in the test. Fill in the Test Name and Test Description for the experiment you are creating. This information is all internal - the more detail you include here the better! Tests can be live for several weeks, and your future self will thank you for including the details here.

You can add new groups to include in the test by clicking on the โ€˜+โ€™ button. Name the groups for the experiment and use the slider to allocate what percentage of traffic will go to each group. Click โ€˜Continueโ€™ when you are done.

Step 3: Set up targeting if needed

Targeting is an optional step. This tool allows you to apply specific conditions to certain site visitors.

There are a few different ways you can do this:

  • You can set up currency and country targeting that allows you to limit your test to a single currency and/or a list of specific countries. This feature is defaulted to your store currency for price test.

  • You can use UTM parameters to customize your user experience under the Audience option.

  • You can filter traffic based on JavaScript Expressions under the Audience option.

  • You can filter traffic based on device type (i.e. mobile or desktop) under the Audience option.

  • You can filter traffic based off of whether a visitor is new or returning under the Audience option.

  • You can prevent users from being targeted by related experiments to reduce undesired interactions under the Mutually Exclusive Tests option.

You can learn more about targeting here!

Step 4: Get relevant IDs

Custom content tests require you to know the experiment ID and test group IDs so that you can branch your design or logic accordingly. You can get this information by clicking the Show Info button in the more menu:

Step 5: Use the Intelligems window object API to set up your custom test

Now that you have your test group IDs, you can use Intelligems' window object Javascript API to get the current user's test group for the given experiment. Once you know the user's test group, you can branch logic and styling with it. For example, you might set a class or show/hide an element to affect styling, or condition logic in your own Javascript code to provide a different experience.

Last updated