Sign inGet started

Ecommerce

To track an event using the ecommerce package, you can use the corresponding method on the tracker instance. For example:

Example

Contoh kode
val properties = EcommerceCheckoutUpdatedProperties(
    checkoutId = checkoutId
)
bird.tracker.ecommerce.checkoutUpdated(properties)

Methods

checkoutUpdated()

Contoh kode
val properties = EcommerceCheckoutUpdatedProperties(
    checkoutId = checkoutId
)
bird.tracker.ecommerce.checkoutUpdated(properties)

EcommerceCheckoutUpdatedProperties

PropertyType
checkout_id?String
checkout_url?String
currency?String
customer_email?String
customer_phone?String
items?Array<Map<String, Any?>>
product_categories?Array
product_ids?Array
product_names?Array
product_skus?Array
total_price?Number

checkoutAbandoned()

Contoh kode
val properties = EcommerceCheckoutAbandonedProperties(
    billingAddress = billingAddress
)
bird.tracker.ecommerce.checkoutAbandoned(properties)

EcommerceCheckoutAbandonedProperties

PropertyType
billing_address?Map<String, Any?>
checkout_id?String
checkout_url?String
currency?String
customer_email?String
customer_phone?String
items?Array<Map<String, Any?>>
product_categories?Array
product_ids?Array
product_names?Array
product_skus?Array
total_price?Number

orderConfirmed()

Contoh kode
val properties = EcommerceOrderConfirmedProperties(
    billingAddress = billingAddress
)
bird.tracker.ecommerce.orderConfirmed(properties)

EcommerceOrderConfirmedProperties

PropertyType
billing_address?Map<String, Any?>
currency?String
customer_email?String
customer_phone?String
financial_status?String
items?Array<Map<String, Any?>>
order_created_at?String
order_id?String
order_number?String
order_updated_at?String
order_url?String
product_categories?Array
product_ids?Array
product_names?Array
product_skus?Array
shipping_address?Map<String, Any?>
total_price?Number

orderCanceled()

Contoh kode
val properties = EcommerceOrderCanceledProperties(
    billingAddress = billingAddress
)
bird.tracker.ecommerce.orderCanceled(properties)

EcommerceOrderCanceledProperties

PropertyType
billing_address?Map<String, Any?>
currency?String
customer_email?String
customer_phone?String
financial_status?String
items?Array<Map<String, Any?>>
order_canceled_at?String
order_created_at?String
order_id?String
order_number?String
order_updated_at?String
order_url?String
product_categories?Array
product_ids?Array
product_names?Array
product_skus?Array
reason?String
shipping_address?Map<String, Any?>
total_price?Number

orderFulfilled()

Contoh kode
val properties = EcommerceOrderFulfilledProperties(
    billingAddress = billingAddress
)
bird.tracker.ecommerce.orderFulfilled(properties)

EcommerceOrderFulfilledProperties

PropertyType
billing_address?Map<String, Any?>
currency?String
customer_email?String
customer_phone?String
financial_status?String
fulfillment_status?String
fulfillments?Array<Map<String, Any?>>
items?Array<Map<String, Any?>>
order_closed_at?String
order_created_at?String
order_id?String
order_number?String
order_processed_at?String
order_updated_at?String
order_url?String
product_categories?Array
product_ids?Array
product_names?Array
product_skus?Array
shipping_address?Map<String, Any?>
total_price?Number

cartViewed()

Contoh kode
val properties = EcommerceCartViewedProperties(
    cartId = cartId
)
bird.tracker.ecommerce.cartViewed(properties)

EcommerceCartViewedProperties

PropertyType
cart_id?String
checkout_url?String
currency?String
customer_email?String
customer_phone?String
items?Array<Map<String, Any?>>
product_ids?Array
product_names?Array
product_skus?Array
total_price?Number
total_quantity?Number

cartUpdated()

Contoh kode
val properties = EcommerceCartUpdatedProperties(
    cartId = cartId
)
bird.tracker.ecommerce.cartUpdated(properties)

EcommerceCartUpdatedProperties

PropertyType
cart_id?String
checkout_url?String
currency?String
customer_email?String
customer_phone?String
items?Array<Map<String, Any?>>
product_ids?Array
product_names?Array
product_skus?Array
total_price?Number
total_quantity?Number

productViewed()

Contoh kode
val properties = EcommerceProductViewedProperties(
    price = price
)
bird.tracker.ecommerce.productViewed(properties)

EcommerceProductViewedProperties

PropertyType
price?Number
product_id?Any
product_image_url?String
product_name?Any
product_sku?Any
product_url?String

collectionViewed()

Contoh kode
val properties = EcommerceCollectionViewedProperties(
    collectionId = collectionId
)
bird.tracker.ecommerce.collectionViewed(properties)

EcommerceCollectionViewedProperties

PropertyType
collection_id?Any
collection_name?Any