What a test can change on a page
GET
/api/v1/analytics/experiments/elements
const url = 'https://digize.com/api/v1/analytics/experiments/elements?siteId=example&path=%2F';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”siteId
required
A site’s id, from sites.workers.list.
string
A site’s id, from sites.workers.list.
path
The page’s path.
string
The page’s path.
Responses
Section titled “Responses”Done
Media typeapplication/json
object
url
required
string | null
unavailable
required
string | null
elements
required
Array<object>
object
kind
required
string
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
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
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
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
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
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}