Skip to main content

Goal

Next, create a segment to target visitors who browse a specific URL, such as www.site-test.com. See the segment creation guide for details.

Requirements

  • access token
The Automation API requires an access token. Retrieve the token programmatically by following the instructions in the obtaining an access token section.
  • siteId
    • Retrieve the siteId directly in code with the siteCode by calling the get a site by code endpoint.
    • Alternatively, log into the Kameleoon account, navigate to the bottom-left corner, and select Projects under the Admin section:
    SiteID
    Click Edit on the project:
    Edit
    The siteId is the five-digit number in the URL (for example, 29353):
    Digits

Create the Segment

Endpoint:
Example:

Create a goal for the experiment

Goal

Goals are metrics to track campaign success. This section creates a Click goal to count clicks on the .cta-button element. See the goal creation guide for more information.

Steps

Create the goal

Endpoint:
Example:

Add a goal and segment before launching an experiment

Goal

Link the goal and segment to Experiment_1 and activate the experiment.

Steps

Endpoint:
Example:

2. Verify launch

Refresh the dashboard. Experiment_1 should now display Online status:
Experiment_activated

Creation, configuration, and launch of an experiment using the Automation API are now complete.