Root AnyOf Event
An example event that has anyOf at the root level.
DataLayer Examples
root options:
- Has Param C
- Has Param D
window.dataLayer.push({
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-any-of-event.json",
"event": "any_of_event",
"param_c": "example_c"
});
window.dataLayer.push({
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-any-of-event.json",
"event": "any_of_event",
"param_d": true
});
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-any-of-event.json" | ||||
| event | string | required | | |
const: "any_of_event" | ||||
Select any of the following options:An example event that has anyOf at the root level. | ||||
This is the description for Param C. | ||||
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-any-of-event.json",
"title": "Root AnyOf Event",
"description": "An example event that has anyOf at the root level.",
"type": "object",
"allOf": [
{
"$ref": "./events/components/dataLayer.json"
}
],
"required": [
"$schema",
"event"
],
"anyOf": [
{
"title": "Has Param C",
"description": "This is the description for Param C.",
"properties": {
"param_c": {
"type": "string",
"examples": [
"example_c"
]
}
}
},
{
"title": "Has Param D",
"properties": {
"param_d": {
"type": "boolean",
"examples": [
true
]
}
}
}
],
"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-any-of-event.json"
},
"event": {
"type": "string",
"const": "any_of_event"
}
}
}