Skip to main content
PUT
/
goals
/
{goalId}
Replace goal
curl --request PUT \
  --url https://api.kameleoon.com/goals/{goalId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "hasMultipleConversions": true,
  "name": "<string>",
  "siteId": 123,
  "type": "CLICK",
  "accessLimiters": [
    {
      "accessHolder": "PERSONALIZATION",
      "accessHolderId": 123,
      "id": 123
    }
  ],
  "customDatas": [
    {
      "method": "ADOBE_ANALYTICS",
      "name": "<string>",
      "siteId": 123,
      "adobeAnalyticsVariableName": "<string>",
      "advancedProposedValues": "<string>",
      "customEvalCode": "<string>",
      "description": "<string>",
      "format": "BOOLEAN",
      "gtmVariableName": "<string>",
      "isConstant": true,
      "isFiltrableVentilable": true,
      "isLearnable": true,
      "isLocalOnly": true,
      "tags": "<string>",
      "tcVariableName": "<string>",
      "tealiumVariableName": "<string>",
      "type": "COUNT_LIST"
    }
  ],
  "description": "<string>",
  "params": {
    "matchString": "<string>",
    "matchType": "CONTAINS"
  },
  "status": "ACTIVE",
  "tags": [
    "<string>"
  ],
  "targetingSegmentMentalist": [
    123
  ],
  "trackingTools": [
    "GOOGLE_ANALYTICS4"
  ]
}
'
{
  "hasMultipleConversions": true,
  "name": "<string>",
  "siteId": 123,
  "type": "CLICK",
  "accessLimiters": [
    {
      "accessHolder": "PERSONALIZATION",
      "accessHolderId": 123,
      "id": 123
    }
  ],
  "createdBy": 123,
  "customDatas": [
    {
      "method": "ADOBE_ANALYTICS",
      "name": "<string>",
      "siteId": 123,
      "adobeAnalyticsVariableName": "<string>",
      "advancedProposedValues": "<string>",
      "createdById": 123,
      "customEvalCode": "<string>",
      "dateCreated": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "format": "BOOLEAN",
      "gtmVariableName": "<string>",
      "id": 123,
      "index": 123,
      "isConstant": true,
      "isFiltrableVentilable": true,
      "isLearnable": true,
      "isLocalOnly": true,
      "modificationDate": "2023-11-07T05:31:56Z",
      "siteCode": "<string>",
      "tags": "<string>",
      "tcVariableName": "<string>",
      "tealiumVariableName": "<string>",
      "type": "COUNT_LIST"
    }
  ],
  "dateCreated": "2023-11-07T05:31:56Z",
  "dateModified": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "experimentAmount": 123,
  "experiments": [
    123
  ],
  "featureFlagAmount": 123,
  "holdoutAmount": 123,
  "holdouts": [
    123
  ],
  "id": 123,
  "isActive": true,
  "isTargetingSegmentMentalist": true,
  "mentalistWeight": 123,
  "params": {
    "matchString": "<string>",
    "matchType": "CONTAINS"
  },
  "personalizationAmount": 123,
  "personalizations": [
    123
  ],
  "status": "ACTIVE",
  "tags": [
    "<string>"
  ],
  "targetingSegmentMentalist": [
    123
  ],
  "trackingTools": [
    "GOOGLE_ANALYTICS4"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

goalId
integer<int64>
required

Body

application/json
hasMultipleConversions
boolean
required

Indicates if this goal has multiple conversions

name
string
required

Name of the goal

siteId
integer<int64>
required

Site Id of the project that the goal belongs to

type
enum<string>
required

Type of goal

Available options:
CLICK,
CUSTOM,
SCROLL,
PAGE_VIEWS,
URL,
TIME_SPENT,
RETENTION_RATE,
WAREHOUSE,
RATIO_METRICS
accessLimiters
object[]
customDatas
object[]

List of custom data using this goal

description
string
params
object

Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.

status
enum<string>

Indicates the status of the goal: active or inactive

Available options:
ACTIVE,
INACTIVE
tags
string[]

List of tags belonging to this goal. For GET requests: this is an optional field that has to be specified in request params.

List of tags belonging to this goal. For GET requests: this is an optional field that has to be specified in request params.

targetingSegmentMentalist
integer<int64>[]
trackingTools
enum<string>[]
Available options:
GOOGLE_ANALYTICS4,
GOOGLE_ANALYTICS4_AUDIENCES,
GOOGLE_UNIVERSAL_ANALYTICS,
ECONDA,
SMART_TAG,
PIANO,
ADOBE_OMNITURE,
EULERIAN,
WEBTRENDS,
KISSMETRICS,
PIWIK,
CRAZY_EGG,
COM_SCORE,
TEALIUM,
YSANCE,
M_PATHY,
SMARTFOCUS,
EMARSYS,
EXPERTSENDER,
TAG_COMMANDER,
CONTENT_SQUARE,
WEBTREKK,
CUSTOM_INTEGRATIONS,
HEAP,
HEAP_COHORTS,
SEGMENT,
MIXPANEL,
CLARITY,
IABTCF,
DATABRICKS,
REDSHIFT,
SMARTLOOK,
MOUSEFLOW,
KLAVIYO,
FULLSTORY,
AMPLITUDE,
SNOWPLOW,
JUNE,
MPARTICLE,
BIGQUERY,
RUDDERSTACK,
SNOWFLAKE,
GLASSBOX,
HUBSPOT,
AIR360,
DATADOG,
QUANTUM_METRIC,
GLASSBOX_V2,
BRAZE,
KAMELEOON_TRACKING,
CUSTOM_TRACKING,
VERCEL,
AKAMAI

Response

OK

hasMultipleConversions
boolean
required

Indicates if this goal has multiple conversions

name
string
required

Name of the goal

siteId
integer<int64>
required

Site Id of the project that the goal belongs to

type
enum<string>
required

Type of goal

Available options:
CLICK,
CUSTOM,
SCROLL,
PAGE_VIEWS,
URL,
TIME_SPENT,
RETENTION_RATE,
WAREHOUSE,
RATIO_METRICS
accessLimiters
object[]
createdBy
integer<int64>
read-only

Account Id of the creator of the experiment

customDatas
object[]

List of custom data using this goal

dateCreated
string<date-time>
read-only
dateModified
string<date-time>
read-only
description
string
experimentAmount
integer<int64>
read-only

Number of experiments using this goal. This is an optional field that that is included in the request body

experiments
integer<int64>[]
read-only

List of experiment ids using this goal. This is an optional field that is included in the request body

List of experiment ids using this goal. This is an optional field that is included in the request body

featureFlagAmount
integer<int64>
read-only

Number of feature flags using this goal. This is an optional field that that is included in the request body

holdoutAmount
integer<int64>
read-only

Number of holdouts using this goal. This is an optional field that is included in the request body

holdouts
integer<int64>[]
read-only

List of holdout ids using this goal. This is an optional field that is included in the request body

List of holdout ids using this goal. This is an optional field that is included in the request body

id
integer<int64>
read-only

Unique Id of the goal

isActive
boolean
deprecated
read-only

Deprecated. Use status instead. Indicates the status of the goal: active or not

isTargetingSegmentMentalist
boolean
read-only

Indicates if the goal is related to a mentalist segment. This is an optional field that is included in the request body

mentalistWeight
number<double>
read-only
params
object

Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.

personalizationAmount
integer<int64>
read-only

Number of personalizations using this goal. This is an optional field that is included in the request body

personalizations
integer<int64>[]
read-only

List of personalization ids using this goal. This is an optional field that is included in the request body

List of personalization ids using this goal. This is an optional field that is included in the request body

status
enum<string>

Indicates the status of the goal: active or inactive

Available options:
ACTIVE,
INACTIVE
tags
string[]

List of tags belonging to this goal. For GET requests: this is an optional field that has to be specified in request params.

List of tags belonging to this goal. For GET requests: this is an optional field that has to be specified in request params.

targetingSegmentMentalist
integer<int64>[]
trackingTools
enum<string>[]
Available options:
GOOGLE_ANALYTICS4,
GOOGLE_ANALYTICS4_AUDIENCES,
GOOGLE_UNIVERSAL_ANALYTICS,
ECONDA,
SMART_TAG,
PIANO,
ADOBE_OMNITURE,
EULERIAN,
WEBTRENDS,
KISSMETRICS,
PIWIK,
CRAZY_EGG,
COM_SCORE,
TEALIUM,
YSANCE,
M_PATHY,
SMARTFOCUS,
EMARSYS,
EXPERTSENDER,
TAG_COMMANDER,
CONTENT_SQUARE,
WEBTREKK,
CUSTOM_INTEGRATIONS,
HEAP,
HEAP_COHORTS,
SEGMENT,
MIXPANEL,
CLARITY,
IABTCF,
DATABRICKS,
REDSHIFT,
SMARTLOOK,
MOUSEFLOW,
KLAVIYO,
FULLSTORY,
AMPLITUDE,
SNOWPLOW,
JUNE,
MPARTICLE,
BIGQUERY,
RUDDERSTACK,
SNOWFLAKE,
GLASSBOX,
HUBSPOT,
AIR360,
DATADOG,
QUANTUM_METRIC,
GLASSBOX_V2,
BRAZE,
KAMELEOON_TRACKING,
CUSTOM_TRACKING,
VERCEL,
AKAMAI