Option A
This is the description for Param A.
DataLayer Example
window.dataLayer.push({
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/root-choice-event.json",
"event": "option_a",
"param_a": "example_a"
});
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.3.0/web/root-choice-event.json" | ||||
| event | string | const: "option_a" | | The event name. |
| param_a | string | | A string parameter for option A. |
View Raw JSON Schema
{
: "https://json-schema.org/draft/2020-12/schema",
: "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/root-choice-event.json",
"title": "Root Choice Event",
"description": "An example event that has oneOf at the root level.",
"x-tracking-targets": [
"web-datalayer-js"
],
"allOf": [
{
"type": "object",
"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.3.0/web/root-choice-event.json"
}
},
"required": [
"$schema"
]
},
{
"oneOf": [
{
"title": "Option A",
: "option_a",
"description": "This is the description for Param A.",
"type": "object",
"properties": {
"event": {
"type": "string",
"const": "option_a",
"description": "The event name."
},
"param_a": {
"type": "string",
"description": "A string parameter for option A.",
"examples": [
"example_a"
]
}
}
},
{
"title": "Option B",
: "option_b",
"type": "object",
"properties": {
"event": {
"type": "string",
"const": "option_b",
"description": "The event name."
},
"param_b": {
"type": "integer",
"description": "An integer parameter for option B.",
"examples": [
123
]
}
}
}
]
}
]
}