# Product Events
Product events capture e-commerce activity - what contacts browse, add to cart, purchase, and more. They use a predefined set of event types so your data maps cleanly to Positive User's commerce reports.
# Send a product event
- Kotlin
- Java
val params = mapOf(
"price" to 89,
"currency" to "USD",
"size" to "42"
)
UserCom.getInstance().sendProductEvent(
"SKU-1234",
ProductEventType.PURCHASE,
params
)
The attributes map is optional:
UserCom.getInstance().sendProductEvent("SKU-1234", ProductEventType.VIEW, null)
# Event types
| Value |
|---|
ADD_TO_CART |
PURCHASE |
LIKING |
ADD_TO_OBSERVATION |
ORDER |
RESERVATION |
RETURN |
VIEW |
CLICK |
DETAIL |
ADD |
REMOVE |
CHECKOUT |
CHECKOUT_OPTION |
REFUND |
PROMO_CLICK |
# Parameters
| Parameter | Type | Required |
|---|---|---|
productId | String | Yes |
eventType | ProductEventType | Yes |
attributes | Map<String, Object> | No |