conversionloopdevelopers

API reference

The REST API behind the Conversionloop dashboard. Everything you can set up in the dashboard, you can automate here.

Requests and responses are JSON. Authenticate with an API token as a bearer token. Each endpoint lists the scope the token needs.

Base URL https://api.conversionloop.net · openapi.yaml · openapi.json

Projects

A project is one website: one script tag, one public key, one set of campaigns. Data fields, audiences and campaigns all belong to a project.

List projects

GET /v1/projects

Scope projects:read

All projects of the workspace that are not archived, oldest first.

Responses

  • 200 The projects.
    Fields
    • data array of object required
      Fields
      • id string

        ID, starting with prj_.

      • workspaceId string
      • name string
      • publicKey string

        Key in the script tag, starting with prj_live_. Not a secret.

      • domains array of string

        Hostnames the script runs on. Empty means any host.

      • consentMode string
        One of not_required, required, cookieless_fallback.
      • consentSignal string | null
      • sampleRate number
      • maxConcurrent integer
      • debug boolean
      • inlineConfig boolean

        Whether campaigns are delivered inside the script.

      • revision string

        Changes with every change that affects the script.

      • archivedAt string | null
      • createdAt string (date-time)
      • updatedAt string (date-time)
      • _count object

        Number of campaigns, audiences and data fields in the project.

        Fields
        • campaigns integer
        • audiences integer
        • dataFields integer
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
Request
curl https://api.conversionloop.net/v1/projects \
  -H "Authorization: Bearer $CL_TOKEN"

Create a project

POST /v1/projects

Scope projects:write

Creates a project with a new public key. Campaigns are delivered inside the script unless you set inlineConfig to false.

Request body ProjectInput

  • name string required
    1–120 characters.
  • domains array of string

    Hostnames the script may run on, like example.com or *.example.com. A domain also covers its subdomains. On any other host the script stays silent and responses are rejected. Empty means no restriction: set this before going live.

    Default []. At most 50 items.
  • consentMode string

    required: the script does nothing until consent is given. cookieless_fallback: it runs without storing anything on the visitor's device until consent is given.

    One of not_required, required, cookieless_fallback. Default "not_required".
  • consentSignal string

    Name of a window event that signals consent, or of a global variable or function that returns true once consent is given.

    At most 120 characters.
  • sampleRate number

    Share of impressions that are recorded. Responses are always recorded. Lower it on very high traffic.

    Default 1. 0–1.
  • maxConcurrent integer

    How many campaigns may be visible at the same time.

    Default 1. 1–3.
  • debug boolean

    Log what the script does to the browser console.

    Default false.
  • inlineConfig boolean

    Deliver campaigns inside the script instead of loading them with a second request. See Install the script.

    Default true.

Responses

  • 201 The new project.
    Returns Project.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
Request
curl -X POST https://api.conversionloop.net/v1/projects \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Online shop",
    "domains": [
      "shop.example.com"
    ],
    "consentMode": "required",
    "consentSignal": "cmpConsentGiven"
  }'

Get a project

GET /v1/projects/{projectId}

Scope projects:read

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 200 The project.
    Returns Project.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"
Response 200
{
  "id": "prj_4k9x2m7q1v8b3n6c5z0wd",
  "workspaceId": "wsp_8h2k4m6p9r1t3v5x7z0bc",
  "name": "Online shop",
  "publicKey": "prj_live_0wk048ap7g5r9ba007fs98gj",
  "domains": [
    "shop.example.com"
  ],
  "consentMode": "required",
  "consentSignal": "cmpConsentGiven",
  "sampleRate": 1,
  "maxConcurrent": 1,
  "debug": false,
  "inlineConfig": true,
  "revision": "7q2m9x4k1v8b",
  "archivedAt": null,
  "createdAt": "2026-12-03T09:12:44.120Z",
  "updatedAt": "2026-12-03T09:30:02.871Z"
}

Update a project

PATCH /v1/projects/{projectId}

Scope projects:write

Changes only the fields you send. Changes reach visitors within about five minutes.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Request body ProjectPatch

Any fields of ProjectInput. Fields you leave out stay unchanged.

  • name string
    1–120 characters.
  • domains array of string

    Hostnames the script may run on, like example.com or *.example.com. A domain also covers its subdomains. On any other host the script stays silent and responses are rejected. Empty means no restriction: set this before going live.

    Default []. At most 50 items.
  • consentMode string

    required: the script does nothing until consent is given. cookieless_fallback: it runs without storing anything on the visitor's device until consent is given.

    One of not_required, required, cookieless_fallback. Default "not_required".
  • consentSignal string

    Name of a window event that signals consent, or of a global variable or function that returns true once consent is given.

    At most 120 characters.
  • sampleRate number

    Share of impressions that are recorded. Responses are always recorded. Lower it on very high traffic.

    Default 1. 0–1.
  • maxConcurrent integer

    How many campaigns may be visible at the same time.

    Default 1. 1–3.
  • debug boolean

    Log what the script does to the browser console.

    Default false.
  • inlineConfig boolean

    Deliver campaigns inside the script instead of loading them with a second request. See Install the script.

    Default true.

Responses

  • 200 The updated project.
    Returns Project.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl -X PATCH https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": [
      "shop.example.com",
      "*.example.com"
    ]
  }'

Archive a project

DELETE /v1/projects/{projectId}

Scope projects:write

Archives the project. The script stops serving campaigns for it, and it no longer appears in the project list. Collected responses are kept.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 204 Archived.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl -X DELETE https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Rotate the public key

POST /v1/projects/{projectId}/rotate-key

Scope projects:write

Issues a new public key. Pages that still use the old script tag stop showing campaigns until you update the tag. Use this if someone embeds your key on sites you do not control.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 200 The project with its new publicKey.
    Returns Project.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl -X POST https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/rotate-key \
  -H "Authorization: Bearer $CL_TOKEN"

Get the script tag

GET /v1/projects/{projectId}/snippet

Scope projects:read

The script tag to paste into the <head> of your pages, matching the project's delivery setting.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 200 The script tag.
    Fields
    • snippet string required

      The complete <script> tag.

    • publicKey string required
    • inlineConfig boolean required

      Whether campaigns are delivered inside the script.

  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/snippet \
  -H "Authorization: Bearer $CL_TOKEN"
Response 200
{
  "snippet": "<script async src=\"https://cdn.conversionloop.net/v1/p/prj_live_0wk048ap7g5r9ba007fs98gj.js\"></script>",
  "publicKey": "prj_live_0wk048ap7g5r9ba007fs98gj",
  "inlineConfig": true
}

Get the script size

GET /v1/projects/{projectId}/bundle-size

Scope projects:read

Transfer size of both delivery options with the campaigns that are live right now, so you can decide whether to deliver campaigns inside the script. Sizes are in bytes.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 200 Sizes in bytes, uncompressed and gzip.
    Fields
    • campaigns integer

      Number of live and scheduled campaigns measured.

    • engine Size | null

      The script alone, as loaded when campaigns come from the API. null if the script is unavailable.

    • config Size

      The campaign configuration the script loads separately in that case.

    • inline Size | null

      The script with campaigns inside. null if the script is unavailable.

  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/bundle-size \
  -H "Authorization: Bearer $CL_TOKEN"
Response 200
{
  "campaigns": 2,
  "engine": {
    "raw": 31210,
    "gzip": 11843
  },
  "config": {
    "raw": 2914,
    "gzip": 902
  },
  "inline": {
    "raw": 34171,
    "gzip": 12611
  }
}

Data fields

Typed values your site passes to the script with conversionloop.set(). Audiences can target them, and campaigns can store them with every response.

List data fields

GET /v1/projects/{projectId}/data-fields

Scope datafields:read

All data fields of the project, sorted by key.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 200 The data fields.
    Fields
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/data-fields \
  -H "Authorization: Bearer $CL_TOKEN"

Create a data field

POST /v1/projects/{projectId}/data-fields

Scope datafields:write

The key must be unique within the project and cannot be changed later.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Request body DataFieldInput

A typed value your site passes to the script.

  • key string required

    Name used in conversionloop.set() and in audience rules. Lowercase letters, digits and underscores, starting with a letter. Cannot be changed later.

    1–64 characters. Pattern ^[a-z][a-z0-9_]*$.
  • label string required

    Name shown in the dashboard.

    1–120 characters.
  • type string required

    Type of the value. Values that do not match are ignored in comparisons.

    One of string, number, boolean, date, enum.
  • options array of string

    Allowed values when type is enum.

    At most 50 items.
  • source string

    client: set in the browser with conversionloop.set(). server: reserved for values supplied by your backend.

    One of client, server. Default "client".
  • collect boolean

    Marks the field for storage with responses. Note: the script currently sends every data field you set along with impressions and answers, see What is sent.

    Default true.
  • description string

    Note for your team.

    At most 500 characters.

Responses

  • 201 The new data field.
    Returns DataField.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 409 A resource with the same key or slug already exists in the project.
Request
curl -X POST https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/data-fields \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "cart_value",
    "label": "Cart value",
    "type": "number",
    "description": "Gross cart value in EUR."
  }'

Update a data field

PATCH /v1/projects/{projectId}/data-fields/{dataFieldId}

Scope datafields:write

Changes only the fields you send. The key cannot be changed, because campaigns and stored responses refer to it.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • dataFieldId string required

    ID of the data field, starting with dfl_.

Request body DataFieldPatch

Any fields of DataFieldInput except key. Fields you leave out stay unchanged.

  • label string

    Name shown in the dashboard.

    1–120 characters.
  • type string

    Type of the value. Values that do not match are ignored in comparisons.

    One of string, number, boolean, date, enum.
  • options array of string

    Allowed values when type is enum.

    At most 50 items.
  • source string

    client: set in the browser with conversionloop.set(). server: reserved for values supplied by your backend.

    One of client, server. Default "client".
  • collect boolean

    Marks the field for storage with responses. Note: the script currently sends every data field you set along with impressions and answers, see What is sent.

    Default true.
  • description string

    Note for your team.

    At most 500 characters.

Responses

  • 200 The updated data field.
    Returns DataField.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl -X PATCH https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/data-fields/dfl_6p3k8x2m4q9v1b7n5c0wd \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Cart value (gross)"
  }'

Delete a data field

DELETE /v1/projects/{projectId}/data-fields/{dataFieldId}

Scope datafields:write

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • dataFieldId string required

    ID of the data field, starting with dfl_.

Responses

  • 204 Deleted.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl -X DELETE https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/data-fields/dfl_6p3k8x2m4q9v1b7n5c0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Audiences

Reusable visitor segments. The script evaluates them in the browser, so no visitor data has to leave the page before a campaign shows.

List audiences

GET /v1/projects/{projectId}/audiences

Scope audiences:read

All audiences of the project, newest first.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Responses

  • 200 The audiences.
    Fields
    • data array of object required
      Fields
      • id string

        ID, starting with aud_.

      • projectId string
      • workspaceId string
      • name string
      • description string | null
      • createdAt string (date-time)
      • updatedAt string (date-time)
      • _count object
        Fields
        • campaigns integer

          Number of campaigns using this audience.

  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/audiences \
  -H "Authorization: Bearer $CL_TOKEN"

Create an audience

POST /v1/projects/{projectId}/audiences

Scope audiences:write

Rules are checked before saving: unknown operators, missing values and references to audiences that do not exist (or that would form a loop) are rejected. See Audience rules for all conditions.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Request body AudienceInput

  • name string required
    1–200 characters.
  • description string
    At most 1000 characters.
  • rules AudienceRules required

Responses

  • 201 The new audience.
    Returns Audience.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 422 The request is valid but cannot be applied, for example because it refers to something that does not exist.
Request
curl -X POST https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/audiences \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Leaving the checkout",
    "rules": {
      "groups": [
        {
          "id": "g1",
          "match": "all",
          "conditions": [
            {
              "id": "c1",
              "type": "url",
              "operator": "contains",
              "value": "/checkout"
            },
            {
              "id": "c2",
              "type": "exit_intent",
              "operator": "is_true"
            }
          ]
        }
      ]
    }
  }'

Get an audience

GET /v1/projects/{projectId}/audiences/{audienceId}

Scope audiences:read

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • audienceId string required

    ID of the audience, starting with aud_.

Responses

  • 200 The audience.
    Returns Audience.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/audiences/aud_2m8k4x9q1v7b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Update an audience

PATCH /v1/projects/{projectId}/audiences/{audienceId}

Scope audiences:write

Changes only the fields you send. rules is replaced as a whole. Live campaigns using the audience pick up the change within about five minutes.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • audienceId string required

    ID of the audience, starting with aud_.

Request body AudiencePatch

Any fields of AudienceInput. Fields you leave out stay unchanged.

  • name string
    1–200 characters.
  • description string
    At most 1000 characters.

Responses

  • 200 The updated audience.
    Returns Audience.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 422 The request is valid but cannot be applied, for example because it refers to something that does not exist.
Request
curl -X PATCH https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/audiences/aud_2m8k4x9q1v7b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Delete an audience

DELETE /v1/projects/{projectId}/audiences/{audienceId}

Scope audiences:write

Only possible while no campaign uses the audience; otherwise the response is 422.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • audienceId string required

    ID of the audience, starting with aud_.

Responses

  • 204 Deleted.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 422 The request is valid but cannot be applied, for example because it refers to something that does not exist.
Request
curl -X DELETE https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/audiences/aud_2m8k4x9q1v7b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Campaigns

A question (or call to action) shown to an audience at a chosen moment. New campaigns start as drafts; set the status to live to publish.

List campaigns

GET /v1/projects/{projectId}/campaigns

Scope campaigns:read

Campaigns of the project, most recently changed first. Archived campaigns are left out unless you ask for them with status=archived.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Query parameters

Responses

  • 200 The campaigns.
    Fields
    • data array of object required
      Fields
      • id string

        ID, starting with cmp_.

      • projectId string
      • workspaceId string
      • audienceId string | null
      • slug string
      • name string
      • goal string | null
      • appearance Appearance
      • delivery Delivery
      • dataFieldKeys array of string
      • startsAt string | null
      • endsAt string | null
      • createdAt string (date-time)
      • updatedAt string (date-time)
      • audience object | null

        Name of the assigned audience, if any.

        Fields
        • id string
        • name string
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns \
  -H "Authorization: Bearer $CL_TOKEN"

Create a campaign

POST /v1/projects/{projectId}/campaigns

Scope campaigns:write

Creates a draft. Drafts may be incomplete; the checks for going live happen when you change the status. appearance and delivery can be empty objects to use the defaults.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Request body CampaignInput

  • name string required

    Name shown in the dashboard.

    1–200 characters.
  • slug string required

    Unique within the project. Used by conversionloop.trigger() and the campaign_state audience condition.

    1–80 characters. Pattern ^[a-z0-9][a-z0-9-]*$.
  • goal string

    What you want to learn. For your team.

    At most 1000 characters.
  • audienceId string | null

    The audience to show the campaign to. Required to go live.

  • dataFieldKeys array of string

    Data fields this campaign relies on, by key. Unknown keys are rejected with 422.

    Default []. At most 50 items.
  • content CampaignContent required
  • appearance Appearance required
  • delivery Delivery required
  • startsAt string | null

    Start for scheduled campaigns.

  • endsAt string | null

    The campaign stops showing after this time.

Responses

  • 201 The new campaign, with status draft.
    Returns Campaign.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 409 A resource with the same key or slug already exists in the project.
  • 422 The request is valid but cannot be applied, for example because it refers to something that does not exist.
Request
curl -X POST https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Why are you leaving the checkout?",
    "slug": "checkout-exit",
    "audienceId": "aud_2m8k4x9q1v7b3n6c5z0wd",
    "dataFieldKeys": [
      "cart_value"
    ],
    "content": {
      "kind": "single_choice",
      "question": "What is stopping you from ordering today?",
      "options": [
        {
          "id": "price",
          "label": "The price"
        },
        {
          "id": "shipping",
          "label": "Shipping costs or time"
        },
        {
          "id": "unsure",
          "label": "Not sure the product fits"
        },
        {
          "id": "other",
          "label": "Something else",
          "followUp": "What is it?"
        }
      ]
    },
    "appearance": {
      "position": "bottom_right"
    },
    "delivery": {
      "delayMs": 500
    }
  }'

Get a campaign

GET /v1/projects/{projectId}/campaigns/{campaignId}

Scope campaigns:read

The campaign including its full audience.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • campaignId string required

    ID of the campaign, starting with cmp_.

Responses

  • 200 The campaign.
    Fields
    • id string

      ID, starting with cmp_.

    • projectId string
    • workspaceId string
    • audienceId string | null
    • slug string
    • name string
    • goal string | null
    • appearance Appearance
    • delivery Delivery
    • dataFieldKeys array of string
    • startsAt string | null
    • endsAt string | null
    • createdAt string (date-time)
    • updatedAt string (date-time)
    • audience Audience | null
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns/cmp_9x2k4m7q1v8b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Update a campaign

PATCH /v1/projects/{projectId}/campaigns/{campaignId}

Scope campaigns:write

Changes only the fields you send. content, appearance and delivery are each replaced as a whole. Changes to a live campaign reach visitors within about five minutes.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • campaignId string required

    ID of the campaign, starting with cmp_.

Request body CampaignPatch

Any fields of CampaignInput. Fields you leave out stay unchanged.

  • name string

    Name shown in the dashboard.

    1–200 characters.
  • slug string

    Unique within the project. Used by conversionloop.trigger() and the campaign_state audience condition.

    1–80 characters. Pattern ^[a-z0-9][a-z0-9-]*$.
  • goal string

    What you want to learn. For your team.

    At most 1000 characters.
  • audienceId string | null

    The audience to show the campaign to. Required to go live.

  • dataFieldKeys array of string

    Data fields this campaign relies on, by key. Unknown keys are rejected with 422.

    Default []. At most 50 items.
  • appearance Appearance
  • delivery Delivery
  • startsAt string | null

    Start for scheduled campaigns.

  • endsAt string | null

    The campaign stops showing after this time.

Responses

  • 200 The updated campaign.
    Returns Campaign.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 422 The request is valid but cannot be applied, for example because it refers to something that does not exist.
Request
curl -X PATCH https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns/cmp_9x2k4m7q1v8b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "delivery": {
      "delayMs": 2000,
      "trafficShare": 0.5
    }
  }'

Archive a campaign

DELETE /v1/projects/{projectId}/campaigns/{campaignId}

Scope campaigns:write

Takes the campaign offline and sets its status to archived. Its responses stay available in Insights.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • campaignId string required

    ID of the campaign, starting with cmp_.

Responses

  • 204 Archived.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl -X DELETE https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns/cmp_9x2k4m7q1v8b3n6c5z0wd \
  -H "Authorization: Bearer $CL_TOKEN"

Change the status

POST /v1/projects/{projectId}/campaigns/{campaignId}/status

Scope campaigns:write

Publishes, pauses or archives a campaign. Going live or scheduled requires an audience and complete content and appearance; scheduled also requires startsAt. If anything is missing, the response is 422 and details lists what to fix.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • campaignId string required

    ID of the campaign, starting with cmp_.

Request body

Responses

  • 200 The campaign with its new status.
    Returns Campaign.
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
  • 422 The campaign cannot go live yet.
Request
curl -X POST https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns/cmp_9x2k4m7q1v8b3n6c5z0wd/status \
  -H "Authorization: Bearer $CL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "live"
  }'

Insights

Results per project and per campaign, and the raw responses as CSV.

Results of all campaigns

GET /v1/projects/{projectId}/insights

Scope insights:read

Impressions, responses, dismissals and conversions per campaign in a time range (default the last 30 days).

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

Query parameters

  • from string (date-time)

    Start of the range, ISO 8601. Default 30 days before to.

  • to string (date-time)

    End of the range, ISO 8601. Default now.

  • campaignId string

    Only count events of this campaign.

Responses

  • 200 One entry per campaign of the project, including campaigns without events.
    Fields
    • range Range
    • data array of object
      Fields
      • campaign object
        Fields
      • impressions integer
      • responses integer
      • dismissals integer
      • conversions integer
      • responseRate number | null

        Responses per impression, 0 to 1, rounded to four decimals. null without impressions.

  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/insights \
  -H "Authorization: Bearer $CL_TOKEN"
Response 200
{
  "range": {
    "from": "2026-11-03T10:00:00.000Z",
    "to": "2026-12-03T10:00:00.000Z"
  },
  "data": [
    {
      "campaign": {
        "id": "cmp_9x2k4m7q1v8b3n6c5z0wd",
        "name": "Why are you leaving the checkout?",
        "slug": "checkout-exit",
        "status": "live"
      },
      "impressions": 1840,
      "responses": 212,
      "dismissals": 1011,
      "conversions": 0,
      "responseRate": 0.1152
    }
  ]
}

Results of one campaign

GET /v1/projects/{projectId}/campaigns/{campaignId}/insights

Scope insights:read

Answer distribution, ratings, free-text answers, a breakdown by device and a daily timeline. Covers up to 5,000 responses in the range; for all responses use the CSV export.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • campaignId string required

    ID of the campaign, starting with cmp_.

Query parameters

  • from string (date-time)

    Start of the range, ISO 8601. Default 30 days before to.

  • to string (date-time)

    End of the range, ISO 8601. Default now.

Responses

  • 200 The results.
    Fields
    • range Range
    • responses integer

      Number of responses evaluated (at most 5

    • options array of object

      How often each answer option was chosen, most chosen first. With multiple choice every chosen option counts.

      Fields
      • optionId string
      • count integer
    • rating object
      Fields
      • average number | null

        Average rating

      • distribution map

        Number of responses per rating value.

    • texts array of object

      The 200 most recent free-text answers.

      Fields
      • text string
      • at string (date-time)
    • byDevice array of object
      Fields
      • deviceType string
        One of phone, tablet, desktop, unknown.
      • count integer
    • timeline array of object

      Events per day and type.

      Fields
      • day string (date)
      • count integer
  • 400 The request is malformed or fails validation. details lists the issues with the path of each field.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns/cmp_9x2k4m7q1v8b3n6c5z0wd/insights \
  -H "Authorization: Bearer $CL_TOKEN"
Response 200
{
  "range": {
    "from": "2026-11-03T10:00:00.000Z",
    "to": "2026-12-03T10:00:00.000Z"
  },
  "responses": 212,
  "options": [
    {
      "optionId": "shipping",
      "count": 97
    },
    {
      "optionId": "price",
      "count": 64
    },
    {
      "optionId": "unsure",
      "count": 38
    },
    {
      "optionId": "other",
      "count": 13
    }
  ],
  "rating": {
    "average": null,
    "distribution": {}
  },
  "texts": [
    {
      "text": "I could not find the delivery date.",
      "at": "2026-12-02T16:41:09.000Z"
    }
  ],
  "byDevice": [
    {
      "deviceType": "phone",
      "type": "response",
      "count": 131
    },
    {
      "deviceType": "desktop",
      "type": "response",
      "count": 81
    }
  ],
  "timeline": [
    {
      "day": "2026-12-02",
      "type": "impression",
      "count": 64
    },
    {
      "day": "2026-12-02",
      "type": "response",
      "count": 8
    }
  ]
}

Export responses as CSV

GET /v1/projects/{projectId}/campaigns/{campaignId}/responses.csv

Scope insights:read

All responses of the campaign, oldest first, up to 50,000 rows. Columns: occurred_at, session_id, options (option IDs separated by |), rating, text, device, browser, os, url, dwell_ms, scroll_depth, data_fields (JSON).

Cells that start with =, +, - or @ are prefixed with an apostrophe, so spreadsheet programs do not run them as formulas.

Path parameters

  • projectId string required

    ID of the project, starting with prj_ (not the public key).

  • campaignId string required

    ID of the campaign, starting with cmp_.

Responses

  • 200 The CSV file.
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/projects/prj_4k9x2m7q1v8b3n6c5z0wd/campaigns/cmp_9x2k4m7q1v8b3n6c5z0wd/responses.csv \
  -H "Authorization: Bearer $CL_TOKEN" \
  -o responses.csv
Response 200
occurred_at,session_id,options,rating,text,device,browser,os,url,dwell_ms,scroll_depth,data_fields
2026-12-02T16:41:09.000Z,s_7f3k9x2m4q,shipping,,I could not find the delivery date.,phone,safari,ios,https://shop.example.com/checkout,48210,62,"{""cart_value"":149.9}"

Account

Session usage and subscription of the workspace the token belongs to.

Session usage this month

GET /v1/usage

Scope insights:read

Sessions counted in the current calendar month (UTC) against the quota of the plan. Campaigns keep running above the quota.

Responses

  • 200 The usage.
    Fields
    • sessions integer

      Sessions this month.

    • quota integer

      Sessions included in the plan per month.

    • ratio number

      sessions / quota; above 1 when the quota is exceeded.

  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
Request
curl https://api.conversionloop.net/v1/usage \
  -H "Authorization: Bearer $CL_TOKEN"
Response 200
{
  "sessions": 18412,
  "quota": 100000,
  "ratio": 0.18412
}

Get the subscription

GET /v1/billing/subscription

Scope billing:read

Plan, status and current billing period of the workspace. Upgrades and cancellations happen in the dashboard.

Responses

  • 200 The subscription and its plan.
    Fields
    • subscription object
      Fields
      • planId string
        One of free, growth, scale.
      • billing string
        One of monthly, yearly.
      • status string
        One of trialing, active, past_due, canceled, paused.
      • sessionQuota integer
      • trialEndsAt string | null
      • currentPeriodStart string (date-time)
      • currentPeriodEnd string (date-time)
      • cancelAt string | null

        Set after a cancellation; the plan runs until then.

    • plan object | null
      Fields
      • id string
      • name string
      • monthly number

        Price per month in EUR

      • yearly number

        Price per year in EUR

      • sessionQuota integer
  • 401 The token is missing, unknown, expired or revoked.
  • 403 The token lacks the required scope.
  • 404 The resource does not exist in the token's workspace.
Request
curl https://api.conversionloop.net/v1/billing/subscription \
  -H "Authorization: Bearer $CL_TOKEN"

Schemas

Appearance

How the campaign looks. Every field has a default, so {} is valid.

  • position string

    Where the campaign appears. inline places it inside an element on your page.

    One of bottom_right, bottom_left, bottom_bar, top_bar, center_modal, inline. Default "bottom_right".
  • anchorSelector string

    CSS selector of the element to place the campaign in, for inline.

    At most 200 characters.
  • theme string

    auto follows the visitor's light or dark mode.

    One of light, dark, auto. Default "auto".
  • accentColor string

    Color of buttons and highlights

    Default "#0069a9". Pattern ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$.
  • textColor string

    Text color

    Pattern ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$.
  • backgroundColor string

    Background color

    Pattern ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$.
  • cornerRadius integer

    Corner radius in pixels.

    Default 14. 0–32.
  • fontFamily string

    CSS font-family. Default is the font of your page.

    At most 200 characters.
  • backdrop boolean

    Dim the page behind the campaign. Meant for center_modal.

    Default false.
  • animation string

    How the campaign appears. Visitors who prefer reduced motion get no animation.

    One of slide, fade, none. Default "slide".
  • showCloseButton boolean

    Show a close button. Closing counts as a dismissal.

    Default true.
  • showBranding boolean

    Show a small Conversionloop note.

    Default true.
  • customCss string

    Extra CSS. It applies only inside the campaign (Shadow DOM)

    At most 4000 characters.

Audience

  • id string

    ID, starting with aud_.

  • projectId string
  • workspaceId string
  • name string
  • description string | null
  • createdAt string (date-time)
  • updatedAt string (date-time)

AudienceInput

  • name string required
    1–200 characters.
  • description string
    At most 1000 characters.
  • rules AudienceRules required

AudiencePatch

Any fields of AudienceInput. Fields you leave out stay unchanged.

  • name string
    1–200 characters.
  • description string
    At most 1000 characters.

AudienceRules

Groups of conditions. Conditions inside a group are combined with the group's match (all = AND, any = OR); groups are always combined with AND. All condition types, operators and values are listed under Audience rules.

  • groups array of object required

    One to ten groups; a visitor must match every group.

    1–10 items.
    Fields
    • id string required

      Any ID

      At least 1 characters.
    • match string

      all: every condition must match. any: one is enough.

      One of all, any. Default "all".
    • conditions array of object required
      1–30 items.
      Fields
      • id string required

        Any ID

        At least 1 characters.
      • type string required

        What to check. See Audience rules.

        One of dwell_time, scroll_depth, exit_intent, page_views, visit_count, element_seen, click, inactivity, url, referrer, utm, landing_page, schedule, device_type, browser, os, viewport, language, connection, prefers_reduced_motion, cookie, storage, data_field, campaign_state, audience.
      • operator string required

        How to compare. Which operators are allowed depends on type.

        One of eq, neq, gt, gte, lt, lte, between, contains, not_contains, starts_with, ends_with, regex, in, not_in, exists, not_exists, is_true, is_false.
      • field string

        Name of the cookie, data field, UTM parameter, CSS selector or campaign slug, for types that need one.

        At most 200 characters.
      • value string | number | boolean | array of string | number | object

        Value to compare with. Not needed for exists, not_exists, is_true and is_false. between takes two values as an array.

      • include boolean

        false turns the condition around: visitors who match it are excluded.

        Default true.

Campaign

  • id string

    ID, starting with cmp_.

  • projectId string
  • workspaceId string
  • audienceId string | null
  • slug string
  • name string
  • goal string | null
  • appearance Appearance
  • delivery Delivery
  • dataFieldKeys array of string
  • startsAt string | null
  • endsAt string | null
  • createdAt string (date-time)
  • updatedAt string (date-time)

CampaignContent

What the campaign asks. kind selects one of five formats.

Single choice kind: "single_choice"

One answer from a list, optionally with a free-text field.

  • kind "single_choice" required
  • question string required
    1–300 characters.
  • description string
    At most 600 characters.
  • options array of object required

    Two to ten answers.

    2–10 items.
    Fields
    • id string required
      At least 1 characters.
    • label string required
      1–200 characters.
    • followUp string
      At most 200 characters.
    • value string
      At most 200 characters.
  • allowFreeText boolean

    Add a free-text field below the options.

    Default false.
  • thanks string

    Shown after the answer.

    Default "Thank you!". At most 300 characters.
Multiple choice kind: "multi_choice"

Several answers from a list.

  • kind "multi_choice" required
  • question string required
    1–300 characters.
  • description string
    At most 600 characters.
  • options array of object required

    Two to twelve answers.

    2–12 items.
    Fields
    • id string required
      At least 1 characters.
    • label string required
      1–200 characters.
    • followUp string
      At most 200 characters.
    • value string
      At most 200 characters.
  • maxSelections integer

    Upper limit of answers a visitor can pick.

    1–12.
  • thanks string

    Shown after the answer.

    Default "Thank you!". At most 300 characters.
Free text kind: "free_text"

An open question.

  • kind "free_text" required
  • question string required
    1–300 characters.
  • description string
    At most 600 characters.
  • placeholder string
    At most 160 characters.
  • maxLength integer

    Maximum characters of the answer.

    Default 500. 50–2000.
  • thanks string

    Shown after the answer.

    Default "Thank you!". At most 300 characters.
Rating kind: "rating"

A scale, NPS or emoji rating, optionally with a follow-up question.

  • kind "rating" required
  • question string required
    1–300 characters.
  • description string
    At most 600 characters.
  • scale string

    1-5, 1-10, nps (0–10) or emoji (five faces).

    One of 1-5, 1-10, nps, emoji. Default "1-5".
  • lowLabel string

    Label at the low end of the scale.

    At most 60 characters.
  • highLabel string

    Label at the high end of the scale.

    At most 60 characters.
  • followUpQuestion string

    Free-text question shown after the rating.

    At most 300 characters.
  • thanks string

    Shown after the answer.

    Default "Thank you!". At most 300 characters.
Call to action kind: "cta"

A message with a button instead of a question.

  • kind "cta" required
  • headline string required
    1–200 characters.
  • description string
    At most 600 characters.
  • buttonLabel string required
    1–80 characters.
  • buttonHref string (uri) required

    Where the button leads.

  • countAsConversion boolean

    Count a click on the button as a conversion of the campaign.

    Default true.

CampaignInput

  • name string required

    Name shown in the dashboard.

    1–200 characters.
  • slug string required

    Unique within the project. Used by conversionloop.trigger() and the campaign_state audience condition.

    1–80 characters. Pattern ^[a-z0-9][a-z0-9-]*$.
  • goal string

    What you want to learn. For your team.

    At most 1000 characters.
  • audienceId string | null

    The audience to show the campaign to. Required to go live.

  • dataFieldKeys array of string

    Data fields this campaign relies on, by key. Unknown keys are rejected with 422.

    Default []. At most 50 items.
  • content CampaignContent required
  • appearance Appearance required
  • delivery Delivery required
  • startsAt string | null

    Start for scheduled campaigns.

  • endsAt string | null

    The campaign stops showing after this time.

CampaignPatch

Any fields of CampaignInput. Fields you leave out stay unchanged.

  • name string

    Name shown in the dashboard.

    1–200 characters.
  • slug string

    Unique within the project. Used by conversionloop.trigger() and the campaign_state audience condition.

    1–80 characters. Pattern ^[a-z0-9][a-z0-9-]*$.
  • goal string

    What you want to learn. For your team.

    At most 1000 characters.
  • audienceId string | null

    The audience to show the campaign to. Required to go live.

  • dataFieldKeys array of string

    Data fields this campaign relies on, by key. Unknown keys are rejected with 422.

    Default []. At most 50 items.
  • appearance Appearance
  • delivery Delivery
  • startsAt string | null

    Start for scheduled campaigns.

  • endsAt string | null

    The campaign stops showing after this time.

CampaignStatus

draft: not shown. scheduled: shown between startsAt and endsAt. live: shown now (and until endsAt, if set). paused: not shown, can be resumed. archived: not shown, hidden from lists.

One of draft, scheduled, live, paused, archived.

DataField

  • id string

    ID, starting with dfl_.

  • projectId string
  • workspaceId string
  • key string
  • label string
  • type string
    One of string, number, boolean, date, enum.
  • options array of string | null
  • source string
    One of client, server.
  • collect boolean
  • description string | null
  • createdAt string (date-time)
  • updatedAt string (date-time)

DataFieldInput

A typed value your site passes to the script.

  • key string required

    Name used in conversionloop.set() and in audience rules. Lowercase letters, digits and underscores, starting with a letter. Cannot be changed later.

    1–64 characters. Pattern ^[a-z][a-z0-9_]*$.
  • label string required

    Name shown in the dashboard.

    1–120 characters.
  • type string required

    Type of the value. Values that do not match are ignored in comparisons.

    One of string, number, boolean, date, enum.
  • options array of string

    Allowed values when type is enum.

    At most 50 items.
  • source string

    client: set in the browser with conversionloop.set(). server: reserved for values supplied by your backend.

    One of client, server. Default "client".
  • collect boolean

    Marks the field for storage with responses. Note: the script currently sends every data field you set along with impressions and answers, see What is sent.

    Default true.
  • description string

    Note for your team.

    At most 500 characters.

DataFieldPatch

Any fields of DataFieldInput except key. Fields you leave out stay unchanged.

  • label string

    Name shown in the dashboard.

    1–120 characters.
  • type string

    Type of the value. Values that do not match are ignored in comparisons.

    One of string, number, boolean, date, enum.
  • options array of string

    Allowed values when type is enum.

    At most 50 items.
  • source string

    client: set in the browser with conversionloop.set(). server: reserved for values supplied by your backend.

    One of client, server. Default "client".
  • collect boolean

    Marks the field for storage with responses. Note: the script currently sends every data field you set along with impressions and answers, see What is sent.

    Default true.
  • description string

    Note for your team.

    At most 500 characters.

Delivery

When and how often the campaign shows. Every field has a default, so {} is valid.

  • delayMs integer

    Wait this long (milliseconds) after the audience matches before showing.

    Default 0. 0–600000.
  • priority integer

    When several campaigns match at once

    Default 50. 0–100.
  • frequency object

    Limits per visitor, stored on the visitor's device.

    Fields
    • maxImpressions integer

      How often one visitor sees the campaign at most within windowDays.

      Default 1. 1–100.
    • windowDays integer

      Time window for maxImpressions in days. 0 means forever.

      Default 30. 0–365.
    • hideAfterResponse boolean

      Never show again after the visitor answered.

      Default true.
    • reshowAfterDismissDays integer

      Show again this many days after the visitor closed it. 0 means never.

      Default 0. 0–365.
  • trafficShare number

    Share of matching visitors who see the campaign, 0 to 1. Use it to test on part of your traffic.

    Default 1. 0–1.

Error

  • error object required
    Fields
    • code string required

      Stable machine-readable code. See Errors.

      One of bad_request, unauthorized, forbidden, not_found, conflict, unprocessable, rate_limited, internal_error.
    • message string required

      Human-readable explanation. Wording may change.

    • details any

      Additional information

EventType

One of impression, response, dismiss, conversion.

Project

  • id string

    ID, starting with prj_.

  • workspaceId string
  • name string
  • publicKey string

    Key in the script tag, starting with prj_live_. Not a secret.

  • domains array of string

    Hostnames the script runs on. Empty means any host.

  • consentMode string
    One of not_required, required, cookieless_fallback.
  • consentSignal string | null
  • sampleRate number
  • maxConcurrent integer
  • debug boolean
  • inlineConfig boolean

    Whether campaigns are delivered inside the script.

  • revision string

    Changes with every change that affects the script.

  • archivedAt string | null
  • createdAt string (date-time)
  • updatedAt string (date-time)

ProjectInput

  • name string required
    1–120 characters.
  • domains array of string

    Hostnames the script may run on, like example.com or *.example.com. A domain also covers its subdomains. On any other host the script stays silent and responses are rejected. Empty means no restriction: set this before going live.

    Default []. At most 50 items.
  • consentMode string

    required: the script does nothing until consent is given. cookieless_fallback: it runs without storing anything on the visitor's device until consent is given.

    One of not_required, required, cookieless_fallback. Default "not_required".
  • consentSignal string

    Name of a window event that signals consent, or of a global variable or function that returns true once consent is given.

    At most 120 characters.
  • sampleRate number

    Share of impressions that are recorded. Responses are always recorded. Lower it on very high traffic.

    Default 1. 0–1.
  • maxConcurrent integer

    How many campaigns may be visible at the same time.

    Default 1. 1–3.
  • debug boolean

    Log what the script does to the browser console.

    Default false.
  • inlineConfig boolean

    Deliver campaigns inside the script instead of loading them with a second request. See Install the script.

    Default true.

ProjectPatch

Any fields of ProjectInput. Fields you leave out stay unchanged.

  • name string
    1–120 characters.
  • domains array of string

    Hostnames the script may run on, like example.com or *.example.com. A domain also covers its subdomains. On any other host the script stays silent and responses are rejected. Empty means no restriction: set this before going live.

    Default []. At most 50 items.
  • consentMode string

    required: the script does nothing until consent is given. cookieless_fallback: it runs without storing anything on the visitor's device until consent is given.

    One of not_required, required, cookieless_fallback. Default "not_required".
  • consentSignal string

    Name of a window event that signals consent, or of a global variable or function that returns true once consent is given.

    At most 120 characters.
  • sampleRate number

    Share of impressions that are recorded. Responses are always recorded. Lower it on very high traffic.

    Default 1. 0–1.
  • maxConcurrent integer

    How many campaigns may be visible at the same time.

    Default 1. 1–3.
  • debug boolean

    Log what the script does to the browser console.

    Default false.
  • inlineConfig boolean

    Deliver campaigns inside the script instead of loading them with a second request. See Install the script.

    Default true.

Range

The time range the numbers cover.

  • from string (date-time)
  • to string (date-time)

Size

  • raw integer

    Bytes uncompressed.

  • gzip integer

    Bytes with gzip