This article helps you:
Install the web experiment script in your website.
Create and configure a new web experiment.
Amplitude's web experimentation provides a no-code solution running experiments on the web. Copy the script snippet for your Amplitude project into your site and begin running experiments immediately.
URL Redirect tests are in open Beta.
To implement Amplitude's web experimentation, copy and paste the standalone Amplitude experiment script into your website. Paste the script into the <head>
element of your site as high up as possible to avoid flickering.
This script snippet tracks experiment events through the Amplitude Analytics SDK installed on your site. Replace API_KEY
with your project's API key.
1<script src="https://cdn.amplitude.com/script/API_KEY.experiment.js"><script>
1<script src="https://cdn.eu.amplitude.com/script/API_KEY.experiment.js"></script>
You must install Amplitude Analytics on your website to enable Experiment event tracking to Amplitude for analysis. Install the analytics SDK using a script tag or using your preferred package manager (for example npm, yarn etc.)
Web experimentation builds off of Amplitude's end-to-end feature experimentation platform to enable no-code experimentation on the web, but differs in a few key ways:
Web Experimentation | Feature Experimentation |
---|---|
Requires implementation using Experiment script snippet | Generally implemented using a SDK or an API. |
Enables no-code experimentation. | Requires engineering work to implement features and flags. |
Only supported on Web platforms. | Supports on any platform or system. |
Use web experimentation if...
Use feature experimentation if...
To set up a web experiment, follow these steps:
<head>
and </head>
tags of your site. Also, make sure your site has the Amplitude Analytics SDK installed, to properly monitor your exposures.As with feature-level experimentation (using flags), you can test the behavior of the redirect before deploying it. The preview is available after you’ve attached URLs to all your variants.
When you preview and test, you can specify which variant you want to verify for the redirect behavior.
There are limits imposed on experiment configuration when using visual experimentation and Amplitude’s low-code implementation:
Thanks for your feedback!
June 17th, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.