Skip to main content
All CollectionsSolve an issue
How to integrate JOIN in AB Tasty
How to integrate JOIN in AB Tasty
Clara Hachem avatar
Written by Clara Hachem
Updated over a week ago

You have the possibility to integrate JOIN in your AB Tasty tool to create an AB experience.

How to proceed?

⚠️ You should not inject the script directly in AB Tasty. You need to follow the following steps:

Copy the following script and make sure you replace the fields mentioned below:

ALIAS_TO_REPLACE : to be replaced by the alias of the widget. You can find it in the integration tab of your widget :

DOMAIN_NAME_TO_REPLACE : to be replaced by your JOIN domain name. You can find it in any widget embed code as you can see below ⬇️


DIV_ID_TO_REPLACE : to be replaced by the div ID where you wish to inject the widget.

const domainName = "MY_DOMAIN_NAME";
const alias = "MY_ALIAS";
const divId = "MY_DIV_ID";
const loadWidget = (alias) => {
const script = document.createElement("script");
script.src = `https://${domainName}/widgets/${alias}/index.js`;
script.setAttribute("data-join-widget-id", divId);
script.setAttribute("data-join-widget-alias", alias);
script.setAttribute("type", "text/javascript");
const div = document.getElementById(divId);
if (div) {
div.appendChild(script);
}
}

loadWidget(alias);

You're now ready to launch your AB Test experience 😊

Did this answer your question?