16
loading...
This website collects cookies to deliver better user experience
const ALL_GROUPS = ['A', 'B']
type Group = typeof ALL_GROUPS[number]
const randomGroup = (): Group => ALL_GROUPS[Math.floor(Math.random() * ALL_GROUPS.length)]
<head>
tags in your index.html
file. This script will include your Google Analytics ID and Optimize ID.Run Diagnostics
to check that the script has been installed properly and is running on your app.optimize.activate
but feel free to rename this.react-optimize
. Check its GitHub repo for more info.<Experiment id="<experiment-id>">
and <Variant id="0">
. Looking under the hood, it's pretty lightweight and does all the management of loading Optimize at the right time, for you. You will however, need to stick to the default custom activation event name of optimize.activate
for it to work.react-ab-test
package from Marvel App.