E-commerce transactions can make great qualifiers for putting visitors into segments. Just knowing that a transaction occurred may sometimes be enough (e.g., for a "Customers" or "High Value Customers" segment).
To track a transaction, simply call the following on your receipt page (or when the transaction is complete):
Where data is a JSON object with the following properties:
The transaction total.
An array of objects, each one representing a line-item that contains the following properties:
A value indicating the total value of any and all discounts applied to the transaction.
Let's say a visitor purchases two "Widgets", totally $112.64. The call would look like this:
NOTE: Persosa will not validate that the total is the sum of all products.