RECOMMENDEDRecommended events

purchase

Google docs

Log this event when one or more items are purchased. Use a unique transaction_id to help prevent duplicate purchase reporting. customer_type can identify new versus returning customers.

Parameters · 8

ParameterDescriptionTypeRequiredExample
currency

Currency of the items associated with the event, in
3-letter
ISO 4217 format.
* If you set value then currency is required
for revenue metrics to be computed accurately.

string

Yes*

USD

transaction_id

The unique identifier of a transaction.
The transaction_id parameter helps you avoid getting duplicate events for a purchase.

string

Yes

T_12345

value

The monetary value of the event.
* value is required for meaningful reporting and to
populate the purchasers predictive
audience.
* currency is required if you set value.

number

Yes*

12.21

customer_type

Whether the conversion is from a new or returning customer. Use new or returning; omit when uncertain.

string

No

new

coupon

The coupon name/code associated with the event.
Event-level and item-level coupon parameters are
independent.

string

No

SUMMER_FUN

shipping

Shipping cost associated with a transaction.

number

No

3.33

tax

Tax cost associated with a transaction.

number

No

1.11

items

The items for the event.

Array

Yes