If a redirect variation was executed on the previous page, all the details of that experiment are accessible on the next page through the getRedirectInfo()
function.
window.optimizelyEdge.get('state').getRedirectInfo()
> {experimentId: '123', referrer: 'https://www.google.com/', variationId: '456' }
Parameters
None
Returns
An object containing details about the redirect variation that was executed on the previous page. If no such redirect variation was executed, the function returns null
.
Parameter | Type | Description |
---|---|---|
experimentId | string | The ID of the redirect experiment |
referrer | string | The value of the original referrer to the page, before the redirect occurred |
variationId | string | The ID of the redirect variation |