Kameleoon

App · 25 actions

Run Kameleoon experiments from workflows: create, launch and stop A/B tests, read their results, manage goals, variations and feature flags, and follow new and changed experiments, goals, segments, feature flags and personalizations.

Actions

ActionWhat it does
Change experiment statusLaunch, pause, resume, stop or schedule an experiment, or send it back to draft.
Create experimentCreate a draft A/B experiment on a project.
Create feature flagCreate a feature flag on a project.
Create goalCreate a goal on a project: a click on an element, a visit to a page, a number of pages viewed, time spent, scroll depth, or a custom goal triggered by code.
Create variationAdd a variation to an experiment, with the JavaScript and CSS that change the page.
Delete experimentDelete an experiment with its variations and results.
Delete feature flagDelete a feature flag from every environment.
Delete goalDelete a goal.
Get experimentGet an experiment: its status, dates, goals, variations and traffic allocation.
Get feature flagGet a feature flag: its variations, variables and each environment's setting.
Get goalGet a goal: its type, what it tracks and its status.
Get projectGet a project's settings: its URL, site code, domains and whether the Kameleoon script is installed.
Get resultsRead a results report by the data code Request experiment results gave.
List experimentsList experiments, optionally only one project's or only those with a given status.
List feature flagsList feature flags with their environments and whether each is on, optionally one project's.
List goalsList the goals (conversions such as clicks, page visits or purchases) experiments measure, optionally one project's.
List personalizationsList personalizations (content shown to a segment of visitors), optionally one project's.
List projectsList the projects (websites and apps) in your Kameleoon account, with each one's ID and site code.
List segmentsList the segments (groups of visitors) experiments and personalizations target, optionally one project's.
List variationsList the variations of an experiment, each with its JavaScript and CSS.
Request experiment resultsAsk Kameleoon to prepare an experiment's results for a period.
Turn feature flag on or offTurn a feature flag on or off in one environment, such as production.
Update experimentChange an experiment's name, description, page, goals, tags, shared code or traffic allocation.
Update goalChange a goal's name, description, tags or whether it counts every conversion.
Update variationChange a variation's name, JavaScript or CSS.

Change experiment status

Launch, pause, resume, stop or schedule an experiment, or send it back to draft.

Inputs

Experimentexperiment_idnumberRequired
The experiment.At least 1.
ChangechangetextRequired
What to do with the experiment. Launching shows it to real visitors.One of: ACTIVATE (Launch), PAUSE, RESUME, STOP, SCHEDULE, DEACTIVATE, REVERT_TO_DRAFT (Back to draft).

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "baseURL": "example",
    "dateCreated": "example",
    "dateEnded": "example",
    "dateModified": "example",
    "dateStarted": "example",
    "dateStatusModified": "example",
    "description": "example",
    "deviations": {},
    "goals": [
      1
    ],
    "hypothesis": "example",
    "id": 1,
    "isArchived": true,
    "mainGoalId": 1,
    "name": "example",
    "siteCode": "example",
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "trafficAllocationMethod": "example",
    "type": "example",
    "variations": [
      1
    ]
  }
}

Create experiment

Create a draft A/B experiment on a project. Kameleoon adds its first variation, which List variations shows.

Inputs

Projectsite_idnumberRequired
The Kameleoon project (Kameleoon's API calls it a site).At least 1.
NamenametextRequired
The experiment's name.
Page URLbase_urltextRequired
The page the editor and preview open, such as `https://www.example.com/`.
Editortypetext
Whether variations are built in the graphic editor or written as code. Leave empty for code.One of: CLASSIC (Graphic editor (classic)), DEVELOPER (Code editor (developer)). Default: DEVELOPER.
Descriptiondescriptiontext
What the experiment is about.
Hypothesishypothesistext
What you expect the change to do.
Tagstagslist
Tags to label it with in Kameleoon.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "baseURL": "example",
    "dateCreated": "example",
    "dateEnded": "example",
    "dateModified": "example",
    "dateStarted": "example",
    "dateStatusModified": "example",
    "description": "example",
    "deviations": {},
    "goals": [
      1
    ],
    "hypothesis": "example",
    "id": 1,
    "isArchived": true,
    "mainGoalId": 1,
    "name": "example",
    "siteCode": "example",
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "trafficAllocationMethod": "example",
    "type": "example",
    "variations": [
      1
    ]
  }
}

Create feature flag

Create a feature flag on a project. Kameleoon sets up its development, staging and production environments.

Inputs

Projectsite_codetextRequired
The project the feature flag belongs to, by its site code.
Feature keyfeature_keytextRequired
The key your code checks, such as `new_checkout`: lower-case letters, digits, - and _.
NamenametextRequired
The flag's name.
Descriptiondescriptiontext
What the flag controls.
Tagstagslist
Tags to label it with in Kameleoon.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "archived": true,
    "dateCreated": "example",
    "dateModified": "example",
    "description": "example",
    "environmentConfigurations": [
      {
        "dateModified": "example",
        "defaultVariationKey": "example",
        "environmentKey": "example",
        "featureEnabled": true
      }
    ],
    "featureKey": "example",
    "health": "example",
    "id": 1,
    "name": "example",
    "primaryGoalId": 1,
    "siteCode": "example",
    "tags": [
      "example"
    ],
    "variations": [
      {
        "key": "example",
        "name": "example"
      }
    ]
  }
}

Create goal

Create a goal on a project: a click on an element, a visit to a page, a number of pages viewed, time spent, scroll depth, or a custom goal triggered by code.

Inputs

Projectsite_idnumberRequired
The Kameleoon project (Kameleoon's API calls it a site).At least 1.
NamenametextRequired
The goal's name.
Goal typetypetextRequired
What the goal counts.One of: CUSTOM (Custom (triggered by code)), CLICK (Click on an element), URL (Visit to a page), PAGE_VIEWS (Number of pages viewed), TIME_SPENT (Time spent on the site), SCROLL (Scroll depth).
CSS selectorcss_selectortext
For a click goal: the CSS selector of the element, such as `.cta-button`.
Page URLurltext
For a page visit goal: the URL, or part of it, to match.
URL matchurl_matchtext
For a page visit goal: how the URL is matched. Leave empty for contains.One of: CONTAINS (URL contains), CORRESPONDS_EXACTLY (URL is exactly), REGULAR_EXPRESSION (URL matches a regular expression).
Amountamountnumber
For pages viewed, the number of pages; for time spent, seconds; for scroll depth, the percentage or pixels.At least 0.
Comparisoncomparisontext
For pages viewed or time spent: how the amount is compared. Leave empty for more than.One of: MORE_THAN (More than), EQUALS (Exactly), LESS_THAN (Less than).
Scroll measured inscroll_typetext
For scroll depth: what the amount measures. Leave empty for a percentage.One of: PERCENTAGE (Percentage of the page), PIXELS_HEIGHT (Pixels from the top), ELEMENT (An element).
JavaScriptjs_codetext
For a custom goal: JavaScript that runs on every page and calls `triggerGoal()` to count a conversion.
Count every conversionmultiple_conversionstrue/false
On to count every conversion in a visit, not only the first.
Statusstatustext
Whether the goal is tracked. Leave empty for active.One of: ACTIVE, INACTIVE.
Descriptiondescriptiontext
What the goal measures.
Tagstagslist
Tags to label it with in Kameleoon.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "dateCreated": "example",
    "dateModified": "example",
    "description": "example",
    "hasMultipleConversions": true,
    "id": 1,
    "name": "example",
    "params": {},
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "type": "example"
  }
}

Create variation

Add a variation to an experiment, with the JavaScript and CSS that change the page.

Inputs

Projectsite_idnumberRequired
The Kameleoon project (Kameleoon's API calls it a site).At least 1.
Experimentexperiment_idnumberRequired
The experiment the variation is for.At least 1.
NamenametextRequired
The variation's name.
JavaScriptjs_codetext
JavaScript the variation runs on the page.
CSScss_codetext
CSS the variation adds to the page.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "creationMode": "example",
    "cssCode": "example",
    "experimentId": 1,
    "id": 1,
    "isJsCodeAfterDomReady": true,
    "jsCode": "example",
    "name": "example",
    "personalizationId": 1,
    "siteId": 1
  }
}

Delete experiment

Delete an experiment with its variations and results. This can't be undone.

Inputs

Experimentexperiment_idnumberRequired
The experiment.At least 1.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Delete feature flag

Delete a feature flag from every environment. Code that checks it gets its default. This can't be undone.

Inputs

Projectsite_codetextRequired
The project the feature flag belongs to, by its site code.
Feature flagfeature_keytextRequired
The feature flag, by its key.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Delete goal

Delete a goal. Experiments stop measuring it. This can't be undone.

Inputs

Goalgoal_idnumberRequired
The goal.At least 1.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Get experiment

Get an experiment: its status, dates, goals, variations and traffic allocation.

Inputs

Experimentexperiment_idnumberRequired
The experiment.At least 1.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "baseURL": "example",
    "dateCreated": "example",
    "dateEnded": "example",
    "dateModified": "example",
    "dateStarted": "example",
    "dateStatusModified": "example",
    "description": "example",
    "deviations": {},
    "goals": [
      1
    ],
    "hypothesis": "example",
    "id": 1,
    "isArchived": true,
    "mainGoalId": 1,
    "name": "example",
    "siteCode": "example",
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "trafficAllocationMethod": "example",
    "type": "example",
    "variations": [
      1
    ]
  }
}

Get feature flag

Get a feature flag: its variations, variables and each environment's setting.

Inputs

Projectsite_codetextRequired
The project the feature flag belongs to, by its site code.
Feature flagfeature_keytextRequired
The feature flag, by its key.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "archived": true,
    "dateCreated": "example",
    "dateModified": "example",
    "description": "example",
    "environmentConfigurations": [
      {
        "dateModified": "example",
        "defaultVariationKey": "example",
        "environmentKey": "example",
        "featureEnabled": true
      }
    ],
    "featureKey": "example",
    "health": "example",
    "id": 1,
    "name": "example",
    "primaryGoalId": 1,
    "siteCode": "example",
    "tags": [
      "example"
    ],
    "variations": [
      {
        "key": "example",
        "name": "example"
      }
    ]
  }
}

Get goal

Get a goal: its type, what it tracks and its status.

Inputs

Goalgoal_idnumberRequired
The goal.At least 1.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "dateCreated": "example",
    "dateModified": "example",
    "description": "example",
    "hasMultipleConversions": true,
    "id": 1,
    "name": "example",
    "params": {},
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "type": "example"
  }
}

Get project

Get a project's settings: its URL, site code, domains and whether the Kameleoon script is installed.

Inputs

Projectsite_idnumberRequired
The Kameleoon project (Kameleoon's API calls it a site).At least 1.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "code": "example",
    "dateCreated": "example",
    "description": "example",
    "domainNames": [
      "example"
    ],
    "id": 1,
    "isKameleoonEnabled": true,
    "isScriptActive": true,
    "name": "example",
    "tags": [
      "example"
    ],
    "type": "example",
    "url": "example"
  }
}

Get results

Read a results report by the data code Request experiment results gave. Its status is WAITING until the report is ready.

Inputs

Data codedata_codetextRequired
The data code Request experiment results returned.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "data": {},
    "errorDescription": "example",
    "status": "READY"
  }
}

List experiments

List experiments, optionally only one project's or only those with a given status.

Inputs

Projectsite_idnumber
Only records of this project. Leave empty for every project.At least 1.
Statusstatustext
Only experiments with this status. Leave empty for every status.One of: ACTIVE, PAUSED, STOPPED, DRAFT, SCHEDULED.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "baseURL": "example",
      "dateCreated": "example",
      "dateEnded": "example",
      "dateModified": "example",
      "dateStarted": "example",
      "dateStatusModified": "example",
      "description": "example",
      "deviations": {},
      "goals": [
        1
      ],
      "hypothesis": "example",
      "id": 1,
      "isArchived": true,
      "mainGoalId": 1,
      "name": "example",
      "siteCode": "example",
      "siteId": 1,
      "status": "example",
      "tags": [
        "example"
      ],
      "trafficAllocationMethod": "example",
      "type": "example",
      "variations": [
        1
      ]
    }
  ]
}

List feature flags

List feature flags with their environments and whether each is on, optionally one project's.

Inputs

Projectsite_codetext
Only this project's flags. Leave empty for every project.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "archived": true,
      "dateCreated": "example",
      "dateModified": "example",
      "description": "example",
      "environmentConfigurations": [
        {
          "dateModified": "example",
          "defaultVariationKey": "example",
          "environmentKey": "example",
          "featureEnabled": true
        }
      ],
      "featureKey": "example",
      "health": "example",
      "id": 1,
      "name": "example",
      "primaryGoalId": 1,
      "siteCode": "example",
      "tags": [
        "example"
      ],
      "variations": [
        {
          "key": "example",
          "name": "example"
        }
      ]
    }
  ]
}

List goals

List the goals (conversions such as clicks, page visits or purchases) experiments measure, optionally one project's.

Inputs

Projectsite_idnumber
Only records of this project. Leave empty for every project.At least 1.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "dateCreated": "example",
      "dateModified": "example",
      "description": "example",
      "hasMultipleConversions": true,
      "id": 1,
      "name": "example",
      "params": {},
      "siteId": 1,
      "status": "example",
      "tags": [
        "example"
      ],
      "type": "example"
    }
  ]
}

List personalizations

List personalizations (content shown to a segment of visitors), optionally one project's.

Inputs

Projectsite_idnumber
Only records of this project. Leave empty for every project.At least 1.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "baseURL": "example",
      "dateCreated": "example",
      "dateEnded": "example",
      "dateModified": "example",
      "dateStarted": "example",
      "description": "example",
      "goals": [
        1
      ],
      "id": 1,
      "isArchived": true,
      "mainGoalId": 1,
      "name": "example",
      "siteId": 1,
      "status": "example",
      "tags": [
        "example"
      ],
      "type": "example"
    }
  ]
}

List projects

List the projects (websites and apps) in your Kameleoon account, with each one's ID and site code.

Inputs

Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "code": "example",
      "dateCreated": "example",
      "description": "example",
      "domainNames": [
        "example"
      ],
      "id": 1,
      "isKameleoonEnabled": true,
      "isScriptActive": true,
      "name": "example",
      "tags": [
        "example"
      ],
      "type": "example",
      "url": "example"
    }
  ]
}

List segments

List the segments (groups of visitors) experiments and personalizations target, optionally one project's.

Inputs

Projectsite_idnumber
Only records of this project. Leave empty for every project.At least 1.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "dateCreated": "example",
      "dateModified": "example",
      "description": "example",
      "id": 1,
      "name": "example",
      "segmentType": "example",
      "siteId": 1,
      "tags": [
        "example"
      ]
    }
  ]
}

List variations

List the variations of an experiment, each with its JavaScript and CSS.

Inputs

Experimentexperiment_idnumberRequired
The experiment.At least 1.
Pagepagenumber
Which page of results to return, starting at 1. Leave empty for the first page.At least 1.
Records per pageper_pagenumber
How many records a page holds, up to 200. Leave empty for 50.From 1 to 200.

Outputs

datalist
The response from Kameleoon.
Example output
{
  "data": [
    {
      "creationMode": "example",
      "cssCode": "example",
      "experimentId": 1,
      "id": 1,
      "isJsCodeAfterDomReady": true,
      "jsCode": "example",
      "name": "example",
      "personalizationId": 1,
      "siteId": 1
    }
  ]
}

Request experiment results

Ask Kameleoon to prepare an experiment's results for a period. It returns a data code; Get results reads the report with it.

Inputs

Experimentexperiment_idnumberRequired
The experiment.At least 1.
Fromstartdate and timeRequired
The start of the period to report on.
Toenddate and time
The end of the period. Leave empty for now.
Goalsgoal_idslist
Only these goals. Leave empty for every goal of the experiment.
Count conversionsconversion_typetext
Whether every conversion counts, or each visit at most once. Leave empty for every conversion.One of: ALL_CONVERSION (Every conversion), CONVERTED_VISITS (Converted visits (once per visit)). Default: ALL_CONVERSION.
Unique visitorsunique_visitorstrue/false
On to count unique visitors rather than visits.
Sequential testingsequential_testingtrue/false
On to include the sequential testing result.
Bayesian probabilitybayesiantrue/false
On to include the Bayesian probability of each variation winning.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "dataCode": "example"
  }
}

Turn feature flag on or off

Turn a feature flag on or off in one environment, such as production.

Inputs

Projectsite_codetextRequired
The project the feature flag belongs to, by its site code.
Feature flagfeature_keytextRequired
The feature flag, by its key.
EnvironmentenvironmenttextRequired
The environment, such as `production`.
Onenabledtrue/falseRequired
On to turn the flag on in the environment, off to turn it off.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "archived": true,
    "dateCreated": "example",
    "dateModified": "example",
    "description": "example",
    "environmentConfigurations": [
      {
        "dateModified": "example",
        "defaultVariationKey": "example",
        "environmentKey": "example",
        "featureEnabled": true
      }
    ],
    "featureKey": "example",
    "health": "example",
    "id": 1,
    "name": "example",
    "primaryGoalId": 1,
    "siteCode": "example",
    "tags": [
      "example"
    ],
    "variations": [
      {
        "key": "example",
        "name": "example"
      }
    ]
  }
}

Update experiment

Change an experiment's name, description, page, goals, tags, shared code or traffic allocation. Fields left empty stay as they are.

Inputs

Experimentexperiment_idnumberRequired
The experiment.At least 1.
Namenametext
The new name.
Descriptiondescriptiontext
The new description.
Hypothesishypothesistext
The new hypothesis.
Page URLbase_urltext
The page the editor and preview open.
Goalsgoalslist
The goals the experiment measures. This replaces its current goals.
Main goalmain_goal_idnumber
The goal that decides the winning variation.At least 1.
Traffic allocationtraffic_allocationtext
How visitors are split between variations.One of: MANUAL (Manual split), MULTI_ARMED_BANDIT (Multi-armed bandit), CONTEXTUAL_BANDIT (Contextual bandit).
JavaScript for all variationscommon_jstext
JavaScript that runs in every variation.
CSS for all variationscommon_csstext
CSS applied in every variation.
Tagstagslist
The experiment's tags. This replaces its current tags.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "baseURL": "example",
    "dateCreated": "example",
    "dateEnded": "example",
    "dateModified": "example",
    "dateStarted": "example",
    "dateStatusModified": "example",
    "description": "example",
    "deviations": {},
    "goals": [
      1
    ],
    "hypothesis": "example",
    "id": 1,
    "isArchived": true,
    "mainGoalId": 1,
    "name": "example",
    "siteCode": "example",
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "trafficAllocationMethod": "example",
    "type": "example",
    "variations": [
      1
    ]
  }
}

Update goal

Change a goal's name, description, tags or whether it counts every conversion. Fields left empty stay as they are.

Inputs

Goalgoal_idnumberRequired
The goal.At least 1.
Namenametext
The new name.
Descriptiondescriptiontext
The new description.
Count every conversionmultiple_conversionstrue/false
On to count every conversion in a visit, off for only the first.
Tagstagslist
The goal's tags. This replaces its current tags.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "dateCreated": "example",
    "dateModified": "example",
    "description": "example",
    "hasMultipleConversions": true,
    "id": 1,
    "name": "example",
    "params": {},
    "siteId": 1,
    "status": "example",
    "tags": [
      "example"
    ],
    "type": "example"
  }
}

Update variation

Change a variation's name, JavaScript or CSS. Fields left empty stay as they are.

Inputs

Variationvariation_idnumberRequired
The variation, from List variations.At least 1.
Namenametext
The new name.
JavaScriptjs_codetext
The variation's JavaScript, replacing what it has.
CSScss_codetext
The variation's CSS, replacing what it has.

Outputs

dataobject
The response from Kameleoon.
Example output
{
  "data": {
    "creationMode": "example",
    "cssCode": "example",
    "experimentId": 1,
    "id": 1,
    "isJsCodeAfterDomReady": true,
    "jsCode": "example",
    "name": "example",
    "personalizationId": 1,
    "siteId": 1
  }
}

On this page