Skip to main content
Version: 1.2.0

Option B

An example event that has oneOf at the root level.

DataLayer Example

window.dataLayer.push({
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json",
"event": "option_b",
"param_b": 123
});

Event Properties

PropertyTypeConstraintsExamplesDescription
$schemastringrequired
"https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json"
Defines the structure of the event. This can be used to validate an event against the schema provided.
const: "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json"
eventstringconst: "option_b"
"option_b"
param_binteger
123
View Raw JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json#option_b",
"title": "Option B",
"description": "An example event that has oneOf at the root level.",
"type": "object",
"allOf": [
{
"$ref": "./events/components/dataLayer.json"
}
],
"required": [
"$schema"
],
"properties": {
"$schema": {
"type": "string",
"description": "Defines the structure of the event. This can be used to validate an event against the schema provided.",
"const": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json"
},
"event": {
"type": "string",
"const": "option_b"
},
"param_b": {
"type": "integer",
"examples": [
123
]
}
},
"$anchor": "option_b"
}