Skip to content

What a test can change on a page

GET
/api/v1/analytics/experiments/elements
curl --request GET \
--url 'https://digize.com/api/v1/analytics/experiments/elements?siteId=example&path=%2F' \
--header 'x-api-key: <x-api-key>'

Reads one of a site’s pages as visitors get it and lists what a content experiment can change: slots the site marked with data-digize-slot, headings, buttons and calls to action, forms and images, each with its text and a selector that finds it alone, or null when it needs a slot first (a coding run can add data-digize-slot to it).

Needs the analytics:read permission.

siteId
required

A site’s id, from sites.workers.list.

string
/^site_[0-9A-HJKMNP-TV-Z]{26}$/

A site’s id, from sites.workers.list.

path

The page’s path.

string
default: / /^\/[A-Za-z0-9\-._~!$&()*+,;=:@%/]{0,255}$/

The page’s path.

Done

Media typeapplication/json
object
url
required
string | null
unavailable
required
string | null
elements
required
Array<object>
object
kind
required
string
Allowed values: slot heading button form image
tag
required
string
selector
required
string | null
slot
required
string | null
text
required
string
url
required
string | null

Example

{
"elements": [
{
"kind": "slot"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}