The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

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