Skip to main content

config

Creates, updates, deletes, gets or lists a config resource.

Overview

Nameconfig
TypeResource
Idcloudflare.zaraz.config

Fields

The following fields are returned by SELECT queries:

Get Zaraz configuration response.

NameDatatypeDescription
analyticsobjectCloudflare Monitoring settings.
consentobjectConsent management configuration.
dataLayerbooleanData layer compatibility mode enabled.
debugKeystringThe key for Zaraz debug mode.
historyChangebooleanSingle Page Application support enabled.
settingsobjectGeneral Zaraz settings.
toolsobjectTools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object.
triggersobjectTriggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration.
variablesobjectVariables 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.
zarazVersionintegerZaraz internal version of the config.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idGets 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.
updatereplacezone_id, tools, triggers, variables, settings, dataLayer, debugKey, zarazVersionUpdates 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.

NameDatatypeDescription
zone_idstringThe Cloudflare zone ID.

SELECT examples

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

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;