User Object
The User attibute contains the ID and all live experiments and test groups
Intelligems ID
window.igData?.user.igId
(string)
Experiments
window.igData?.user.getExperiments()
(Array<experiment>)
This function returns all experiments that are currently in scope for this user. The logic underneath takes into account whether or not an experiment is active, the user is eligible, and the experiment should run on this page (see Audience and Page Targeting). If you are previewing an experiment using the intelligems Preview mode, only that experiment will be returned here.
Test Groups
Get All Test Groups in the Experiment
window.igData?.user.getTestGroups(experimentId)
(Array<TestGroup>)
We will return all Test Groups that are available for this experiment.
Get Test Group by Experiment ID
window.igData?.user.getTestGroup(experimentId)
(TestGroup | null)
We will return a Test Group object based on the user's assignment for a given experiment. If the experiment is not live or the user has no assignment, we will return null.
Assign User to Test Group
window.igData?.user.assignTestGroup(experimentId, testGroupId)
We will assign the user to the Test Group provided. This explicit assignment will take precedence over Audience Targeting, Page Targeting, or any other exclusions.
Last updated