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
| Property | Type | Constraints | Examples | Description |
|---|---|---|---|---|
| $schema | string | required | | 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 | string | const: "option_b" | | |
| param_b | integer | |
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"
}