Skip to main content
Version: 1.2.0

Root AnyOf Event

An example event that has anyOf at the root level.

DataLayer Examples

root options:

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"
});

Event Properties

PropertyTypeConstraintsExamplesDescription
$schemastringrequired
"https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-any-of-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-any-of-event.json"
eventstringrequired
"any_of_event"
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"
}
}
}