The purchase event is a value in the events
variable. This value is useful for organizations that want to collect data around the revenue that their site generates. It is heavily dependent on the products
and purchaseID
variables.
When you set a purchase event, it affects the following metrics:
products
variableproducts
variableRevenue is not multiplied by the quantity field. For example, s.products="Womens;Socks;5;4.50"
does not pass $22.50 into revenue; it passes $4.50. Make sure that your implementation passes the total revenue for the quantity listed. For example, s.products="Womens;Socks;5;22.50"
.
If using the XDM object, the purchase event uses the following XDM fields:
xdm.commerce.purchases.value
.xdm.productListItems[].quantity
fields. See products
for more information.xdm.productListItems[].priceTotal
fields.{
"xdm": {
"commerce": {
"purchases": {
"value": 1
}
}
}
}
If using the data object, the purchase event uses data.__adobe.analytics.events
, following AppMeasurement string syntax.
{
"data": {
"__adobe": {
"analytics": {
"events": "purchase"
}
}
}
}
Other dependent variables like products
and purchaseID
do not have dedicated fields in the Analytics extension within Adobe Experience Platform Data Collection. Use the custom code editor following AppMeasurement syntax for these variables.
The purchase event is a string that is set as part of the events variable.
// Set the purchase event by itself
s.events = "purchase";
// Set the purchase event alongside other events
s.events = "purchase,event1,event2";
When you fire a purchase event, Adobe checks the following:
purchaseID
variable? If not, Adobe uses information from the hit to create a “temporary purchase ID”. This temporary purchase ID only applies to the visitor of the hit. The previous 5 temporary purchase ID’s are stored for each visitor ID per report suite.purchaseID
variable is defined, does it match any value already collected in the report suite across all visitors? If so, the image request is considered a duplicate purchase. All conversion variables, including the purchase event, do not appear in reporting.