autotune icon indicating copy to clipboard operation
autotune copied to clipboard

Visible experiment options with Turbolinks.js

Open phildionne opened this issue 6 years ago • 2 comments

Given the following setup:

import Turbolinks from 'turbolinks';
Turbolinks.start();
<autotune experiment="blurb">
  <p option="option-1">option 1</p>
  <p option="option-2">option 2</p>
</autotune>

<a href="#" data-autotune data-experiment="blurb">Go</a>

Steps:

  1. Initial page load, option 1 is shown
  2. Click on an internal link and visit page (via turbolinks)
  3. Click on the initial page link, both option 1 and option 2 are visible

Would love to hear some thoughts on how to solve this!

phildionne avatar Oct 02 '18 21:10 phildionne

Does you app key start with 4a6aeec2? I got an error in our logs, this was the request:

{
    "version": 2,
    "appKey": "4a6aeec2-XXX",
    "experiments": {
        "1681128509": {
            "instanceKey": "fc4d1ea7-6a6c-46bd-a0b5-ac4476ac4b2e",
            "options": [],
            "pickedBest": false
        }
    },
    "ctx": {
        "tzo": 240,
        "lang": "fr-CA",
        "sourceIP": "XXX"
    }
}

For some reason, the options array was sent empty. Could you share a self-contained reproducible example?

schani avatar Oct 02 '18 21:10 schani

Yes, that's me.

Here's a basic, standalone replication: https://gist.github.com/phildionne/f90737029755a8ee4fe50ef4e3dad3ee

phildionne avatar Oct 02 '18 22:10 phildionne