Is there a way to create users in splits without actually adding them as Split Account users?



  • Dave Murphy

    Hi Namrata, it appears we are overloading the term 'users' here.  There are the individuals who can log into Split your Organization, create and manage splits, review metrics, modify rollout plans, etc.  These are users of the Split application that work with you.

    In Split, there's the concept of a 'traffic type'.  The traffic type, as described in, is the granularity you use when passing keys to Split's getTreatment call.  The key you pass could be a UUID, a cookie for an anonymous user, an account ID, a session ID, etc.  It's whatever key you want to use to split traffic. When you create a split, you create rules using those keys to determine who gets what treatment.

    By default, there is a 'user' traffic type.  But you can change that to be anything you want, perhaps 'visitor'.  Whatever you call it, these 'users' know nothing about split.


    Comment actions Permalink
  • Namrata Patel

    Thanks Dave,

    I think now I understand it a little. So lets say I create a Split X of Traffic-Type=User and add some rules like


    Now in my Python application I should call this split 

    treatment = split.get_treatment('userId1', 'X')  => ON

    attributes = dict()
    attributes['location'] = 'Cuba'
    treatment = split.get_treatment("dummy", "X", attributes) => OFF

    attributes['location'] = 'UK'
    treatment = split.get_treatment("dummy", "X", attributes) => No matching rule. So ON if my default is ON.

    Does this seem correct? 

    Also if you have a real python example somewhere that would be helpful. The sample that I got from site is pretty bad not even using local features so as to run it.



    Comment actions Permalink
  • Dave Murphy

    Hi Namrata, the second and third getTreatments are correct. The first one is wrong based off the targeting rules. You should have this instead:

    It appears you may be misunderstanding that the "key" field is used by default and doesn't need to be specified in targeting rules.

    Not sure if you looked here, but there are a few Python examples. 


    Comment actions Permalink

Please sign in to leave a comment.