GithubHelp home page GithubHelp logo

Ability to change variants? about split HOT 2 CLOSED

splitrb avatar splitrb commented on August 18, 2024
Ability to change variants?

from split.

Comments (2)

andrew avatar andrew commented on August 18, 2024

Experiments have the concept of versions, if you change alternatives or reset an experiment it should bump the version of the experiment, this is because the user only has the experiment name and a single alternative stored in their cookie.

With no way to expire their cookie, incrementing the version (which stores the experiment as experiment:version in the cookie) means that the user should receive a new alternative from the second version of the experiment.

I suspect that when you use km in this fashion the experiment version is never used so you only every get version 0, and the alternatives have already been set for that.

I think something like this should work for you:

<% Split::Experiment.all.each do |experiment| %>
  <% km.set(experiment.key, ab_test(experiment.name, *experiment.alternative_names)) %>
<% end %>

from split.

jasonm avatar jasonm commented on August 18, 2024

Thanks @andrew - makes sense.

from split.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.