Track transactions
To associate a user’s session with their potential purchases (and corresponding revenue), you must send the transaction via a dedicated API. For each transaction, we send:
- Price (mandatory)
- Currency (mandatory)
- Transaction ID (optional)
window.cs_wvt = window.cs_wvt || [];window.cs_wvt.push(['trackTransaction', { value: 1000, currency: 'EUR', id: 'my-transaction-id'}])// value is a float// currency is a string that must be inferior to 10 characters// id is a string or null
Currency
Section titled CurrencyThe currency is conforming to the ISO 4217 ↗ standard. The currency must be passed as an “alphanumeric code”.
If the currency passed doesn’t match the supported currencies, the SDK will send a currency value of -1
. It will be processed as the default currency of the project.