---
title: Track transactions - WebView
description: Track transactions in your apps using the Web Tracking Tag
lastUpdated: 09 May 2025
source_url:
  html: https://docs.contentsquare.com/en/webview-tracking-tag/track-transactions/
  md: https://docs.contentsquare.com/en/webview-tracking-tag/track-transactions/index.md
---

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:

* Transaction ID
* Revenue
* Currency

```javascript
window._uxa = window._uxa || [];
window._uxa.push([
  "ec:transaction:create",
  {
    id: "123" /* Transaction ID (string, up to 40 characters) */,
    revenue:
      "9.99" /* Transaction's total cost (integer or string, up to 12 digits and 2 decimals - extra decimals are truncated) */,
    currency:
      "usd" /* Currency value (string less than 10 characters or numeric/alphanumeric ISO 4217 value) */,
  },
]);
window._uxa.push(["ec:transaction:send"]);
```

Warning

**Each transaction must only be sent once**. A common mistake is to trigger the sending when the confirmation screen is displayed. This leads to triggering the transaction each time the user puts the app in background and then in foreground on the confirmation screen.

## Currency

The currency is conforming to the [ISO 4217 ↗](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) standard. The currency must be passed as an "alphanumeric code".

If the currency doesn't match the supported currencies, the SDK sends a currency value of `-1`.\
It will be processed as the default currency of the project.
