ABsmartly is one of the most sophisticated AB testing platforms available. This guide will show you how to push ABSmartly variants into Zuko for further analysis.
1. ABsmartly Implementation: Ensure ABsmartly is correctly implemented on your page. Refer to ABsmartly's documentation (docs.absmartly.com).
2. Zuko Account and Tracking: Create a Zuko account (if you don't have one) and ensure that the tracking is successfully added to your form.
Add the following JavaScript function to your page, preferably in a <script> tag within the <head> section or in a separate JavaScript file that's loaded before your Zuko tracking code. This function extracts experiment and variant information from the ABsmartly context.
ABsmartlyContext.ready()
.then(() => {
const context = ABsmartlyContext;
window.zuko = window.zuko || {};
window.zuko.attributes = window.zuko.attributes || {};
for (const experiment of context.data()?.experiments) {
const name = experiment.name;
const variant = context.peek(name);
window.zuko.attributes[`exp_${name}`] = variant;
if (experiment.variants?.[variant]?.name) {
window.zuko.attributes[`variant_${experiment.variants[variant].name}`] = variant;
}
}
console.log("Zuko attributes set:", window.zuko.attributes);
})
.catch((error) => {
console.error("Error initializing ABsmartly context:", error);
});
The `exp_YourExperimentName` and `variant_YourVariantName` can be changed - this is simply how this will appear in Zuko under the filter drop down menu. We are just adding the experiments as attributes into window.zuko.attributes. See Zuko's documentation on setting custom attributes.
1. Run Your A/B Test: Make sure your ABsmartly A/B test is running and users are being assigned to different variants.
2. Submit Test Forms: Fill out the forms on your page while participating in the A/B test. Do this for different variants if possible.
3. Check Zuko: Go to your Zuko dashboard and look for the custom attributes you configured in the filters dropdown. Youshould see attributes like `exp_YourExperimentName` with values corresponding to the assigned variant for each form submission. It might take a few minutes for the data to appear in Zuko.
If you have any issues setting up the ABsmartly integration then please contact us on support@zuko.io