Export Zaraz configuration
GET/zones/{zone_id}/settings/zaraz/export
Exports full current published Zaraz configuration for a zone, secret variables included.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Export Zaraz configuration
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/zaraz/export \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"dataLayer": true,
"debugKey": "debugKey",
"settings": {
"autoInjectScript": true,
"contextEnricher": {
"escapedWorkerName": "escapedWorkerName",
"workerTag": "workerTag"
},
"cookieDomain": "cookieDomain",
"ecommerce": true,
"eventsApiPath": "eventsApiPath",
"hideExternalReferer": true,
"hideIPAddress": true,
"hideQueryParams": true,
"hideUserAgent": true,
"initPath": "initPath",
"injectIframes": true,
"mcRootPath": "mcRootPath",
"scriptPath": "scriptPath",
"trackPath": "trackPath"
},
"tools": {
"foo": {
"blockingTriggers": [
"string"
],
"component": "component",
"defaultFields": {
"foo": "string"
},
"enabled": true,
"name": "name",
"permissions": [
"string"
],
"settings": {
"foo": "string"
},
"type": "component",
"actions": {
"foo": {
"actionType": "actionType",
"blockingTriggers": [
"string"
],
"data": {},
"firingTriggers": [
"string"
]
}
},
"defaultPurpose": "defaultPurpose",
"neoEvents": [
{
"actionType": "actionType",
"blockingTriggers": [
"string"
],
"data": {},
"firingTriggers": [
"string"
]
}
],
"vendorName": "vendorName",
"vendorPolicyUrl": "vendorPolicyUrl"
}
},
"triggers": {
"foo": {
"excludeRules": [
{
"id": "id",
"match": "match",
"op": "CONTAINS",
"value": "value"
}
],
"loadRules": [
{
"id": "id",
"match": "match",
"op": "CONTAINS",
"value": "value"
}
],
"name": "name",
"description": "description",
"system": "pageload"
}
},
"variables": {
"foo": {
"name": "name",
"type": "string",
"value": "value"
}
},
"zarazVersion": 0,
"analytics": {
"defaultPurpose": "defaultPurpose",
"enabled": true,
"sessionExpTime": 60
},
"consent": {
"enabled": true,
"buttonTextTranslations": {
"accept_all": {
"foo": "string"
},
"confirm_my_choices": {
"foo": "string"
},
"reject_all": {
"foo": "string"
}
},
"companyEmail": "companyEmail",
"companyName": "companyName",
"companyStreetAddress": "companyStreetAddress",
"consentModalIntroHTML": "consentModalIntroHTML",
"consentModalIntroHTMLWithTranslations": {
"foo": "string"
},
"cookieName": "cookieName",
"customCSS": "customCSS",
"customIntroDisclaimerDismissed": true,
"defaultLanguage": "defaultLanguage",
"hideModal": true,
"purposes": {
"foo": {
"description": "description",
"name": "name"
}
},
"purposesWithTranslations": {
"foo": {
"description": {
"foo": "string"
},
"name": {
"foo": "string"
},
"order": 0
}
},
"tcfCompliant": true
},
"historyChange": true
}Returns Examples
{
"dataLayer": true,
"debugKey": "debugKey",
"settings": {
"autoInjectScript": true,
"contextEnricher": {
"escapedWorkerName": "escapedWorkerName",
"workerTag": "workerTag"
},
"cookieDomain": "cookieDomain",
"ecommerce": true,
"eventsApiPath": "eventsApiPath",
"hideExternalReferer": true,
"hideIPAddress": true,
"hideQueryParams": true,
"hideUserAgent": true,
"initPath": "initPath",
"injectIframes": true,
"mcRootPath": "mcRootPath",
"scriptPath": "scriptPath",
"trackPath": "trackPath"
},
"tools": {
"foo": {
"blockingTriggers": [
"string"
],
"component": "component",
"defaultFields": {
"foo": "string"
},
"enabled": true,
"name": "name",
"permissions": [
"string"
],
"settings": {
"foo": "string"
},
"type": "component",
"actions": {
"foo": {
"actionType": "actionType",
"blockingTriggers": [
"string"
],
"data": {},
"firingTriggers": [
"string"
]
}
},
"defaultPurpose": "defaultPurpose",
"neoEvents": [
{
"actionType": "actionType",
"blockingTriggers": [
"string"
],
"data": {},
"firingTriggers": [
"string"
]
}
],
"vendorName": "vendorName",
"vendorPolicyUrl": "vendorPolicyUrl"
}
},
"triggers": {
"foo": {
"excludeRules": [
{
"id": "id",
"match": "match",
"op": "CONTAINS",
"value": "value"
}
],
"loadRules": [
{
"id": "id",
"match": "match",
"op": "CONTAINS",
"value": "value"
}
],
"name": "name",
"description": "description",
"system": "pageload"
}
},
"variables": {
"foo": {
"name": "name",
"type": "string",
"value": "value"
}
},
"zarazVersion": 0,
"analytics": {
"defaultPurpose": "defaultPurpose",
"enabled": true,
"sessionExpTime": 60
},
"consent": {
"enabled": true,
"buttonTextTranslations": {
"accept_all": {
"foo": "string"
},
"confirm_my_choices": {
"foo": "string"
},
"reject_all": {
"foo": "string"
}
},
"companyEmail": "companyEmail",
"companyName": "companyName",
"companyStreetAddress": "companyStreetAddress",
"consentModalIntroHTML": "consentModalIntroHTML",
"consentModalIntroHTMLWithTranslations": {
"foo": "string"
},
"cookieName": "cookieName",
"customCSS": "customCSS",
"customIntroDisclaimerDismissed": true,
"defaultLanguage": "defaultLanguage",
"hideModal": true,
"purposes": {
"foo": {
"description": "description",
"name": "name"
}
},
"purposesWithTranslations": {
"foo": {
"description": {
"foo": "string"
},
"name": {
"foo": "string"
},
"order": 0
}
},
"tcfCompliant": true
},
"historyChange": true
}