How to create a Fullstack A/B experiment
Follow the steps below to set up a Fullstack test campaign and control your experiment logic directly from your code using Personizely’s JavaScript API.
⚠️ Note: This test type is designed for advanced users or developers. It does not use the visual builder and must be implemented in your codebase.
- From your Personizely Dashboard, navigate to the Settings tab and click on Features:
This is where you define the features and parameters used in your test variations. Each feature can include one or more parameters of the following types:
- String (e.g.
"Buy now"
,"red"
)
- Boolean (e.g.
true
)
- Number (e.g.
10
)
Click + Add a feature, name it, and define its parameters.
- From your Personizely Dashboard, navigate to the Campaigns tab and click the Create Campaign button at the top right:
- In the “Create new campaign” window, select Full Stack Test, name your campaign, and define a hypothesis to clarify what you’re testing.
Click Create to continue.
- You will be redirected to the campaign settings page. Under Variations, you'll see the Original (control group) and a default Variation 1.
You can rename the variation and click Create variation to add more.
- To assign logic to a variation, click Edit next to it.
In the Variation features window, click + Add feature and select from features you’ve previously created under Settings → Features.
You can assign one or more features per variation.
- Adjust Traffic allocation by setting the percentage of visitors that should be exposed to this campaign.
- In the Goals section, select the action(s) you want to track, like Purchase or Add to cart.
You can assign multiple goals and mark one as the primary goal for reporting.
- Fullstack tests are triggered in your code using Personizely’s JavaScript API:
Use theply.runCampaign(id)
method with your campaign ID to assign a visitor to a variation.
API Overview:
ply.runCampaign(id)
– runs the campaign, returns the variation or null (control group)
variation.getFeature(key)
– accesses a feature by its key
feature.isEnabled()
– returns true/false
feature.getParameterValue(key)
– retrieves the value of a feature parameter
Note: For the best no-flicker experience, make sure the Personizely script is loaded synchronously on your site.
🎉 Congratulations, your Fullstack test is now ready to go live!
**Learn more in the Fullstack Test documentation →
Updated on: 03/07/2025
Thank you!