Skip to main content
Version: 1.3.0

Add Shipping Info

Triggered when a user submits shipping information in checkout.

DataLayer Example

val item1 = Bundle().apply {
putString(FirebaseAnalytics.Param.ITEM_ID, "SKU_12345")
putString(FirebaseAnalytics.Param.ITEM_NAME, "Stan and Friends Tee")
putString(FirebaseAnalytics.Param.AFFILIATION, "Google Merchandise Store")
putString(FirebaseAnalytics.Param.COUPON, "SUMMER_FUN")
putDouble(FirebaseAnalytics.Param.DISCOUNT, 2.22)
putLong(FirebaseAnalytics.Param.INDEX, 0L)
putString(FirebaseAnalytics.Param.ITEM_BRAND, "Google")
putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "Apparel")
putString(FirebaseAnalytics.Param.ITEM_CATEGORY2, "Adult")
putString(FirebaseAnalytics.Param.ITEM_CATEGORY3, "Shirts")
putString(FirebaseAnalytics.Param.ITEM_CATEGORY4, "Crew")
putString(FirebaseAnalytics.Param.ITEM_CATEGORY5, "Short sleeve")
putString(FirebaseAnalytics.Param.ITEM_LIST_ID, "related_products")
putString(FirebaseAnalytics.Param.ITEM_LIST_NAME, "Related Products")
putString(FirebaseAnalytics.Param.ITEM_VARIANT, "green")
putString(FirebaseAnalytics.Param.LOCATION_ID, "ChIJIQBpAG2ahYAR_6128GcTUEo")
putDouble(FirebaseAnalytics.Param.PRICE, 10.01)
putLong(FirebaseAnalytics.Param.QUANTITY, 1L)
putString(FirebaseAnalytics.Param.PROMOTION_ID, "P_12345")
putString(FirebaseAnalytics.Param.PROMOTION_NAME, "Summer Sale")
putString(FirebaseAnalytics.Param.CREATIVE_NAME, "summer_banner2")
putString(FirebaseAnalytics.Param.CREATIVE_SLOT, "featured_app_1")
putString("google_business_vertical", "retail")
}

firebaseAnalytics.logEvent(FirebaseAnalytics.Event.ADD_SHIPPING_INFO) {
param(FirebaseAnalytics.Param.CURRENCY, "USD")
param(FirebaseAnalytics.Param.VALUE, 72.05)
param(FirebaseAnalytics.Param.COUPON, "SUMMER_FUN")
param(FirebaseAnalytics.Param.SHIPPING_TIER, "Ground")
param(FirebaseAnalytics.Param.ITEMS, arrayOf(item1))
}

Event Properties

PropertyTypeConstraintsExamplesDescription
$schemastringrequired
"https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/add-shipping-info-event.json"
Defines the structure of the event.
const: "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/add-shipping-info-event.json"
eventstringrequired
"add_shipping_info"
The event name add_shipping_info.
const: "add_shipping_info"
currencystringrequired
"USD"
ISO 4217 currency code.
minLength: 3
maxLength: 3
valuenumber
72.05
Monetary value of the event.
couponstring
"SUMMER_FUN"
Coupon code associated with the event.
shipping_tierstring
"Ground"
Selected shipping tier.
[]itemsarrayrequiredItems associated with this ecommerce event.
minItems: 1
item_idstring
"SKU_12345"
"PROD_98765"
The ID of the item. Either item_id or item_name is required.
item_namestring
"Stan and Friends Tee"
"Blue Running Shoes"
The name of the item. Either item_id or item_name is required.
affiliationstring
"Google Merchandise Store"
"Nike Store"
A product affiliation to indicate a supplier or store. Note: affiliation is only available at the item level.
couponstring
"SUMMER_FUN"
"WELCOME20"
"SAVE10"
The coupon name/code associated with the item. Coupon parameters at event and item levels are independent.
discountnumber
2.22
5
10.5
The monetary value of the discount per unit applied to the item.
indexnumber
0
1
2
The index or position of the item in a list.
item_brandstring
"Google"
"Nike"
"Adidas"
The brand of the item.
item_categorystring
"Apparel"
"Footwear"
"Electronics"
The category of the item. If used as part of a category hierarchy or taxonomy, this is the first category.
item_category2string
"Adult"
"Women"
"Men"
The second category hierarchy or additional taxonomy of the item.
item_category3string
"Shirts"
"Shoes"
"Boots"
The third category hierarchy or additional taxonomy of the item.
item_category4string
"Crew"
"Running"
"Casual"
The fourth category hierarchy or additional taxonomy of the item.
item_category5string
"Short sleeve"
"Long distance"
"Lightweight"
The fifth category hierarchy or additional taxonomy of the item.
item_list_idstring
"related_products"
"search_results"
"recommendations"
The ID of the list in which the item was presented to the user. If set, item_list_id at the event level is ignored. If not set, item_list_id at the event level is used if available.
item_list_namestring
"Related Products"
"Search Results"
"Recommended Items"
The name of the list in which the item was presented to the user. If set, item_list_name at the event level is ignored. If not set, item_list_name at the event level is used if available.
item_variantstring
"green"
"Blue Size 10"
"M-Black"
The item variant or unique code or description for additional item details/options.
location_idstring
"ChIJIQBpAG2ahYAR_6128GcTUEo"
"store_123"
"location_sf"
The physical location associated with the item, such as the location of a brick-and-mortar store. It is recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used. Note: location_id is only available at the item level.
pricenumber
10.01
21.01
89.99
The price of the item in the specified currency unit. If a discount is applied to the item, set price to the reduced per-unit price and provide the per-unit price discount in the discount parameter.
quantitynumberdefault: 1
1
2
3
The item quantity. If not set, quantity is set to 1.
promotion_idstring
"P_12345"
"PROMO_001"
The ID of the promotion associated with the item.
promotion_namestring
"Summer Sale"
"Black Friday"
"Flash Deal"
The name of the promotion associated with the item.
creative_namestring
"summer_banner2"
"holiday_email_v1"
The name of the promotion creative.
creative_slotstring
"featured_app_1"
"top_banner"
"sidebar"
The name of the creative slot associated with the item.
google_business_verticalstring
"retail"
"ecommerce"
The business vertical for the item (e.g., 'retail').
additionalPropertiesSchema constraintControls properties not listed in properties and not matched by patternProperties.string, number, integer, boolean, null
additionalPropertiesSchema constraintControls properties not listed in properties and not matched by patternProperties.string, number, integer, boolean, null
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/add-shipping-info-event.json",
  "title": "Add Shipping Info",
  "description": "Triggered when a user submits shipping information in checkout.",
  "x-tracking-targets": [
    "android-firebase-kotlin-sdk",
    "android-firebase-java-sdk",
    "ios-firebase-swift-sdk",
    "ios-firebase-objc-sdk"
  ],
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Defines the structure of the event.",
      "const": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/mobile/add-shipping-info-event.json"
    },
    "event": {
      "type": "string",
      "const": "add_shipping_info",
      "description": "The event name add_shipping_info."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code.",
      "minLength": 3,
      "maxLength": 3,
      "examples": [
        "USD"
      ]
    },
    "value": {
      "type": "number",
      "description": "Monetary value of the event.",
      "examples": [
        72.05
      ]
    },
    "coupon": {
      "type": "string",
      "description": "Coupon code associated with the event.",
      "examples": [
        "SUMMER_FUN"
      ]
    },
    "shipping_tier": {
      "type": "string",
      "description": "Selected shipping tier.",
      "examples": [
        "Ground"
      ]
    },
    "items": {
      "$ref": 
    }
  },
  "required": [
    "$schema",
    "event",
    "currency",
    "items"
  ],
  "allOf": [
    {
      "$ref": "https://tracking-docs-demo.buchert.digital/constraints/schemas/firebase/v1/flat-event-params.json"
    }
  ]
}