config
Creates, updates, deletes, gets or lists a config resource.
Overview
| Name | config |
| Type | Resource |
| Id | cloudflare.zaraz.config |
Fields
The following fields are returned by SELECT queries:
- list
Get Zaraz configuration response.
| Name | Datatype | Description |
|---|---|---|
analytics | object | Cloudflare Monitoring settings. |
consent | object | Consent management configuration. |
dataLayer | boolean | Data layer compatibility mode enabled. |
debugKey | string | The key for Zaraz debug mode. |
historyChange | boolean | Single Page Application support enabled. |
settings | object | General Zaraz settings. |
tools | object | Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. |
triggers | object | Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. |
variables | object | Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. |
zarazVersion | integer | Zaraz internal version of the config. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_id | Gets latest Zaraz configuration for a zone. It can be preview or published configuration, whichever was the last updated. Secret variables values will not be included. | |
update | replace | zone_id, tools, triggers, variables, settings, dataLayer, debugKey, zarazVersion | Updates Zaraz configuration for a zone. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- list
Gets latest Zaraz configuration for a zone. It can be preview or published configuration, whichever was the last updated. Secret variables values will not be included.
SELECT
analytics,
consent,
dataLayer,
debugKey,
historyChange,
settings,
tools,
triggers,
variables,
zarazVersion
FROM cloudflare.zaraz.config
WHERE zone_id = '{{ zone_id }}' -- required
;
REPLACE examples
- update
Updates Zaraz configuration for a zone.
REPLACE cloudflare.zaraz.config
SET
analytics = '{{ analytics }}',
consent = '{{ consent }}',
dataLayer = {{ dataLayer }},
debugKey = '{{ debugKey }}',
historyChange = {{ historyChange }},
settings = '{{ settings }}',
triggers = '{{ triggers }}',
variables = '{{ variables }}',
zarazVersion = {{ zarazVersion }},
tools = '{{ tools }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND tools = '{{ tools }}' --required
AND triggers = '{{ triggers }}' --required
AND variables = '{{ variables }}' --required
AND settings = '{{ settings }}' --required
AND dataLayer = {{ dataLayer }} --required
AND debugKey = '{{ debugKey }}' --required
AND zarazVersion = '{{ zarazVersion }}' --required
RETURNING
errors,
messages,
result,
success;