Skip to content

Web Experimentation Overview

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.

Web Experimentation is in Beta

  • URL Redirect tests are in open Beta.

Implement the script snippet

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.

<script src="https://cdn.lab.amplitude.com/web/v1/script/API_KEY.js"><script>
<script src="https://cdn.lab.eu.amplitude.com/web/v1/script/API_KEY.js"></script>

Install Amplitude Analytics

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 vs feature experimentation

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...

  • You want to drive growth or other outcomes on a web based platform.
  • You have limited engineering resources available implement and support feature flags.

Use feature experimentation if...

  • You want to experiment or release arbitrary features on web or non-web (mobile, server, etc.) platforms.
  • You work on a product team with engineering resources available.