Skip to main content
Version: 1.3.0

Root AnyOf Event

An example event that has anyOf at the root level.

DataLayer Examples

root options:

window.dataLayer.push({
"event": "any_of_event",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/root-any-of-event.json",
"param_c": "example_c"
});

Event Properties

PropertyTypeConstraintsExamplesDescription
eventstringrequired
"any_of_event"
The name of the event.
const: "any_of_event"
$schemastringrequired
"https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/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.3.0/web/root-any-of-event.json"

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.3.0/web/root-any-of-event.json",
  "title": "Root AnyOf Event",
  "description": "An example event that has anyOf at the root level.",
  "x-tracking-targets": [
    "web-datalayer-js"
  ],
  "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-any-of-event.json"
    },
    "event": {
      "type": "string",
      "const": "any_of_event",
      "description": "The event name."
    }
  },
  "required": [
    "$schema",
    "event"
  ],
  "anyOf": [
    {
      "title": "Has Param C",
      "description": "This is the description for Param C.",
      "properties": {
        "param_c": {
          "type": "string",
          "description": "An optional string parameter for option C.",
          "examples": [
            "example_c"
          ]
        }
      }
    },
    {
      "title": "Has Param D",
      "properties": {
        "param_d": {
          "type": "boolean",
          "description": "An optional boolean parameter for option D.",
          "examples": [
            true
          ]
        }
      }
    }
  ]
}