Skip to main content
Version: 1.3.0

Checkout Options

Mobile checkout example with oneOf, anyOf, and platform-specific conditional fields using flat Firebase-compatible params.

DataLayer Examples

identity_type options:

firebaseAnalytics.logEvent("checkout_options_selected") {
param("platform", "ios")
param("identity_type", "logged_in")
param("identity_user_id", "user-123")
param("identity_session_id", "sess-789")
param("contact_channel", "email")
param("contact_email", "buyer@example.com")
param("contact_push_token", "token_abc123")
param("att_status", "authorized")
param("ad_personalization_enabled", 1L)
}

contact_channel options:

firebaseAnalytics.logEvent("checkout_options_selected") {
param("platform", "ios")
param("identity_type", "logged_in")
param("identity_user_id", "user-123")
param("identity_session_id", "sess-789")
param("contact_channel", "email")
param("contact_email", "buyer@example.com")
param("contact_push_token", "token_abc123")
param("att_status", "authorized")
param("ad_personalization_enabled", 1L)
}

conditional options:

firebaseAnalytics.logEvent("checkout_options_selected") {
param("platform", "ios")
param("identity_type", "logged_in")
param("identity_user_id", "user-123")
param("identity_session_id", "sess-789")
param("contact_channel", "email")
param("contact_email", "buyer@example.com")
param("contact_push_token", "token_abc123")
param("att_status", "authorized")
}

Event Properties

PropertyTypeConstraintsExamplesDescription
$schemastringrequired
"https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/checkout-options-event.json"
Defines the structure of the event.
const: "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/checkout-options-event.json"
eventstringrequired
"checkout_options_selected"
The event name for checkout option selection.
const: "checkout_options_selected"
platformstringrequired
"ios"
App platform.
enum: [ios, android]

identity_type - Select one of the following options:

Identity mode for the user.

identity_typestringrequired
"logged_in"
const: "logged_in"
identity_user_idstring
"user-123"
Authenticated user ID.
identity_session_idstring
"sess-789"
Anonymous checkout session ID.

contact_channel - Select any of the following options:

How checkout updates should be delivered.

contact_emailstringformat: email
"buyer@example.com"
Email address used for checkout updates.
contact_push_tokenstring
"token_abc123"
Device push token used for checkout updates.
att_statusstringenum: [authorized, denied, not_determined]
"authorized"
App Tracking Transparency status on iOS.
ad_personalization_enabledboolean
true
Whether ad personalization is enabled on Android.
additionalPropertiesSchema constraintControls properties not listed in properties and not matched by patternProperties.string, number, integer, boolean, null
iThe properties below define the condition. When the condition is met, the “Then” branch applies. Otherwise, the “Else” branch applies.If
platformobjectrequired
"ios"
const: "ios"
att_statusstringrequired
"authorized"
App Tracking Transparency status on iOS.
enum: [authorized, denied, not_determined]
View Raw JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/checkout-options-event.json",
  "$dynamicAnchor": "checkoutOptionsEvent",
  "$comment": "Metadata example for the schema JSON viewer on a mobile event schema.",
  "title": "Checkout Options",
  "description": "Mobile checkout example with oneOf, anyOf, and platform-specific conditional fields using flat Firebase-compatible params.",
  "x-tracking-targets": [
    "android-firebase-kotlin-sdk",
    "android-firebase-java-sdk",
    "ios-firebase-swift-sdk",
    "ios-firebase-objc-sdk"
  ],
  "type": "object",
  "allOf": [
    {
      "$ref": "https://tracking-docs-demo.buchert.digital/constraints/schemas/firebase/v1/flat-event-params.json"
    },
    {
      "if": {
        "properties": {
          "platform": {
            "const": "ios"
          }
        },
        "required": [
          "platform"
        ]
      },
      "then": {
        "required": [
          "att_status"
        ]
      },
      "else": {
        "required": [
          "ad_personalization_enabled"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "identity_type": {
            "const": "logged_in"
          }
        },
        "required": [
          "identity_type"
        ]
      },
      "then": {
        "required": [
          "identity_user_id"
        ]
      },
      "else": {
        "required": [
          "identity_session_id"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "contact_channel": {
            "const": "email"
          }
        },
        "required": [
          "contact_channel"
        ]
      },
      "then": {
        "required": [
          "contact_email"
        ]
      },
      "else": {
        "required": [
          "contact_push_token"
        ]
      }
    }
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Defines the structure of the event.",
      "const": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/checkout-options-event.json"
    },
    "event": {
      "type": "string",
      "const": "checkout_options_selected",
      "description": "The event name for checkout option selection."
    },
    "platform": {
      "type": "string",
      "description": "App platform.",
      "enum": [
        "ios",
        "android"
      ],
      "examples": [
        "ios"
      ]
    },
    "identity_type": {
      "description": "Identity mode for the user.",
      "oneOf": [
        {
          "title": "Logged-In User",
          "type": "string",
          "const": "logged_in",
          "examples": [
            "logged_in"
          ]
        },
        {
          "title": "Guest User",
          "type": "string",
          "const": "guest",
          "examples": [
            "guest"
          ]
        }
      ]
    },
    "identity_user_id": {
      "type": "string",
      "description": "Authenticated user ID.",
      "examples": [
        "user-123"
      ]
    },
    "identity_session_id": {
      "type": "string",
      "description": "Anonymous checkout session ID.",
      "examples": [
        "sess-789"
      ]
    },
    "contact_channel": {
      "description": "How checkout updates should be delivered.",
      "anyOf": [
        {
          "title": "Email Updates",
          "type": "string",
          "const": "email",
          "examples": [
            "email"
          ]
        },
        {
          "title": "Push Updates",
          "type": "string",
          "const": "push",
          "examples": [
            "push"
          ]
        }
      ]
    },
    "contact_email": {
      "type": "string",
      "format": "email",
      "description": "Email address used for checkout updates.",
      "examples": [
        "buyer@example.com"
      ]
    },
    "contact_push_token": {
      "type": "string",
      "description": "Device push token used for checkout updates.",
      "examples": [
        "token_abc123"
      ]
    },
    "att_status": {
      "type": "string",
      "description": "App Tracking Transparency status on iOS.",
      "enum": [
        "authorized",
        "denied",
        "not_determined"
      ],
      "examples": [
        "authorized"
      ]
    },
    "ad_personalization_enabled": {
      "type": "boolean",
      "description": "Whether ad personalization is enabled on Android.",
      "examples": [
        true
      ]
    }
  },
  "required": [
    "$schema",
    "event",
    "platform",
    "identity_type",
    "contact_channel"
  ]
}