User Object
The User attibute contains the ID and all live experiments and test groups
Last updated
Was this helpful?
The User attibute contains the ID and all live experiments and test groups
Last updated
Was this helpful?
window.igData?.user.igId
(string)
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 ). If you are previewing an experiment using the intelligems Preview mode, only that experiment will be returned here.
window.igData?.user.getTestGroups(experimentId)
(Array<TestGroup>)
We will return all Test Groups that are available for this experiment.
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.
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.