Skip to content

Force a specific variation through a URL parameter #2

@rkz

Description

@rkz

Context

Let's say we have two experiments running on a view function:

# app.py
@app.route('/')
def index():
    optimize.run('cta_size')
    optimize.run('navbar_color')
    # ...
    return render_template('index.html')

Normally, every user is assigned to a variation for each of the experiments and can't change them.

Goal

As a developer or tester, I want to control which variation I'm assigned to.

Add support to special URL parameters ex_{EXPERIMENT_KEY}={VARIATION_KEY}, such as:

http://my.app/?ex_cta_size=bigger&ex_navbar_color=dark

This would force the variations for the current pageview only.

As a side effect, Google Optimize won't account sessions where different variations for the same experiment are reported.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions