The redirect from Control to Treatment does not work automatically under the following conditions:
-
When the user lands on the Control page via a link.
-
When the user lands on the Control page via a
window.location.href
redirect. -
When the user lands on the Control page via a
header('Location: <target_page>')
redirect in PHP.
Under these conditions, the following occurs:
-
The redirect from Control to Treatment does not work on the Control page.
-
Impression events do not appear in the Live Events section.
-
When calling
experimentInstances
in the browser console, an empty object is returned.
When does the redirect from Control to Treatment work?
If the user navigates to the Control page by typing the URL directly into the address bar and pressing Enter.
Under these conditions, the following occurs:
-
The redirect from Control to Treatment works (provided the user is assigned to the Treatment variant).
-
Impression events appear in the Live Events section.
-
When calling
experimentInstances
in the browser console, the following object is returned:{$default_instance.af0e6e0ed4cedc30360b42ea2571d913.web: e}
Browsers: Safari, Chrome, Firefox
Integration: https://cdn.amplitude.com/script/<key>.experiment.js