Index |
Purchase |
Succeed |
Current Headline: Original
var improveai = new ImproveAI("lv7xLCob5D7tn7fhih5j572syR1g6wkt67LCHq9G", "userid", "beta");
var headline = "not loaded";
improveai.track("Index", {"headline": headline});
var purchase_funnel = [
"Index",
"Purchase",
"Succeed",
];
var headline_choices = [
"A", "B",
];
improveai.choose("headline", headline_choices, purchase_funnel, function(data, status) {
if (status >= 200 && status < 400) {
console.log("choose completed: ");
console.log(data);
headline = JSON.parse(data).properties.headline;
} else {
headline = "Error Loading POST " + improveai.version + "/choose";
}
document.getElementById("headline").innerHTML = headline;
});