Skip to content

Instantly share code, notes, and snippets.

@alexnj
Last active November 9, 2022 15:25
Show Gist options
  • Save alexnj/56e6a1bed280d3111e623f7f6da4d139 to your computer and use it in GitHub Desktop.
Save alexnj/56e6a1bed280d3111e623f7f6da4d139 to your computer and use it in GitHub Desktop.
Revised A/B spec - Demos
{
"control": {
"url": "https://todomvc.com/examples/react",
"cache": {
}
},
"variants": [
{
"weight": 0.5,
"url": "https://todomvc.com/examples/react",
"transformations": [
[1, "head", 3, "<link rel=\"canonical\" href=\"https://todomvc.com/examples/react/\" />"],
[1, "head", 3, "<base href=\"https://todomvc.com/examples/react/\" target=\"_blank\">"]
]
},
{
"weight": 0.5,
"url": "https://todomvc.com/examples/react",
"transformations": [
[1, "head", 3, "<link rel=\"canonical\" href=\"https://todomvc.com/examples/react/\" />"],
[1, "head", 3, "<base href=\"https://todomvc.com/examples/react/\" target=\"_blank\">"],
[1, "head", 4, "<style>body{background:beige!important}</style>"],
[2, "h1", 0, "$.innerHTML=\"a/b test h1\";"],
[2, ".new-todo", 0, "$.placeholder=\"What would you like to do today?\""],
[2, ".todo-list>li", 0, "$.style.color=\"red\""]
]
}
]
}
@micahheineckoptimizely
Copy link

This is a direct translation of the previous version, but lines 23-25 should be able to use the standard operations now, correct? Something like:

        [2, "h1", 7, "a/b test h1"],
        [2, ".new-todo", 9, "placeholder", "What would you like to do today?"],
        [2, ".todo-list>li", 9, "style.color", "red"]

@alexnj
Copy link
Author

alexnj commented Oct 27, 2022

Yes! Why didn't I do that? That should be my next step! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment