HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

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.

ParameterTypeDescription
experimentIdstringThe ID of the redirect experiment
referrerstringThe value of the original referrer to the page, before the redirect occurred
variationIdstringThe ID of the redirect variation