<script> and </script> tags.Code Example
// Tracks the purchase event in Oribi
ORIBI.api('trackPurchase', paramsObject);| field | type | description | example |
|---|---|---|---|
| totalPrice | Number* | required The total amount the customer paid (after shipping, tax, discounts, etc). It can contain a fraction (e.g. a value of 1.5 can describe a price of $1.5) | Can describes a purchase of 1.5 for the store currency defined in the app (e.g. 1.5 US Dollars) |
| currency | String (3 ASCII characters) | optional A three letter ISO-4217 currency code of the currency the prices are in (case insensitive). If provided, it must be in one of our supported currencies (see below), from which it will be converted to the currency you chose in Oribi. If omitted, the store currency you set in Oribi will be used. | Can describe a purchase of ¥1200. If the Oribi store currency in Oribi is not set to Japanese Yen, the prices in this purchase will be converted to it. |
| orderId | String (up to 64 ASCII characters) | optional An order identifier that will be shown in Oribi in the future to help you recognize specific purchases and will be used to make sure you don’t count the same purchase multiple times. If you send multiple purchases with the same (non-null) orderId, Oribi will only count the first purchase and ignore subsequent ones. | |
| taxPrice | Number* | optional The tax paid for the purchase (in the same currency as the total price). (Default: 0) | Tracks a purchase for a grand total of $5.45, out of which $1.2 was for tax |
| shippingPrice | Number* | optional The additional price paid for the shipping of the purchased items (in the same currency as the total price). (Default: 0) | Tracks a purchase for a grand total of $5.45, out of which $1.2 was for shipping |
| discountPrice | Number* | optional The discount for the purchase, if exists (in the same currency as the total price). (Default: 0) | Shows a discount of 4 (the price before discount was probably 9) |
| isFirstPurchase | Boolean* | optional True if the user who perform this purchase perform his first one in this site | |
| products | Array | optional The list of products purchased (see details below) | Buying 4 oranges, each one costing €1.5 |
| products.name | String (up to 64 Unicode characters) | optional The name of the product. Will be used in the future to search or filter purchases. | Code Example |
| products.id | String (up to 64 ASCII characters) | optional The String identifier of the product. | |
| products.price | Number* | optional The price for a single unit of the product. | |
| products.discountPrice | Number* | optional The discount on specific product. | Shows a discount of 4 (the price before discount was probably 9) |
| products.taxPrice | Number* | optional The tax price on specific product. | Tracks a purchase for a grand total of $5, out of which $0.8 was for tax |
| products.quantity | Number (Positive Integer) | optional The amount of the product bought in this purchase. (Default: 1) | Code Example |
| products.categories | Array | optional An array of string categories. Will be used in the future to search and filter purchases. | |
{
totalPrice: 1.5
}{
totalPrice: 1200,
currency: 'JPY'
}{
totalPrice: 1,
orderId: '8J+lsw=='
}{
totalPrice: 5,
currency: 'USD',
taxPrice: 1.28
}{
totalPrice: 5.45,
currency: 'NZD',
shippingPrice: 1.2
}{
totalPrice: 5,
discountPrice: 4
}{
totalPrice: 5,
isFirstPurchase: false
}{
totalPrice: 6,
currency: 'EUR',
products: [
{
name: 'Orange',
id: 'ITEM-672643',
price: 1.5,
quantity: 4,
categories: [
'produce',
'round-fruit'
]
}
]
}Code Example
{
totalPrice: 2,
products: [
{
name: 'Orange',
}
]
}{
totalPrice: 2,
products: [
{
id: 'ITEM-672643',
}
]
}{
totalPrice: 2,
currency: 'FJD',
products: [
{
price: 2,
}
]
}{
totalPrice: 4,
currency: 'FJD',
products: [
{
price: 5,
discountPrice: 4,
}
]
}{
totalPrice: 4.2,
currency: 'FJD',
products: [
{
price: 5,
taxPrice: 0.8,
}
]
}Code Example
{
totalPrice: 3,
currency: 'MZN',
products: [
{
price: 1.5,
quantity: 2,
}
]
}{
totalPrice: 3,
currency: 'MZN',
products: [
{
name: 'Men shower gel',
categories: [
'soap',
'shampoo',
'conditioners',
'face-wash'
]
}
]
}| code | currency |
|---|---|
| AED | United Arab Emirates Dirham |
| AFN | Afghan Afghani |
| ALL | Albanian Lek |
| AMD | Armenian Dram |
| ANG | Netherlands Antillean Guilder |
| AOA | Angolan Kwanza |
| ARS | Argentine Peso |
| AUD | Australian Dollar |
| AWG | Aruban Florin |
| AZN | Azerbaijani Manat |
| BAM | Bosnia-Herzegovina Convertible Mark |
| BBD | Barbadian Dollar |
| BDT | Bangladeshi Taka |
| BGN | Bulgarian Lev |
| BHD | Bahraini Dinar |
| BIF | Burundian Franc |
| BMD | Bermudan Dollar |
| BND | Brunei Dollar |
| BOB | Bolivian Boliviano |
| BRL | Brazilian Real |
| BSD | Bahamian Dollar |
| BTC | Bitcoin |
| BTN | Bhutanese Ngultrum |
| BWP | Botswanan Pula |
| BYN | Belarusian Ruble |
| BZD | Belize Dollar |
| CAD | Canadian Dollar |
| CDF | Congolese Franc |
| CHF | Swiss Franc |
| CLF | Chilean Unit of Account (UF) |
| CLP | Chilean Peso |
| CNH | Chinese Yuan (Offshore) |
| CNY | Chinese Yuan |
| COP | Colombian Peso |
| CRC | Costa Rican Colón |
| CUC | Cuban Convertible Peso |
| CUP | Cuban Peso |
| CVE | Cape Verdean Escudo |
| CZK | Czech Republic Koruna |
| DJF | Djiboutian Franc |
| DKK | Danish Krone |
| DOP | Dominican Peso |
| DZD | Algerian Dinar |
| EGP | Egyptian Pound |
| ERN | Eritrean Nakfa |
| ETB | Ethiopian Birr |
| EUR | Euro |
| FJD | Fijian Dollar |
| FKP | Falkland Islands Pound |
| GBP | British Pound Sterling |
| GEL | Georgian Lari |
| GGP | Guernsey Pound |
| GHS | Ghanaian Cedi |
| GIP | Gibraltar Pound |
| GMD | Gambian Dalasi |
| GNF | Guinean Franc |
| GTQ | Guatemalan Quetzal |
| GYD | Guyanaese Dollar |
| HKD | Hong Kong Dollar |
| HNL | Honduran Lempira |
| HRK | Croatian Kuna |
| HTG | Haitian Gourde |
| HUF | Hungarian Forint |
| IDR | Indonesian Rupiah |
| ILS | Israeli New Sheqel |
| IMP | Manx pound |
| INR | Indian Rupee |
| IQD | Iraqi Dinar |
| IRR | Iranian Rial |
| ISK | Icelandic Króna |
| JEP | Jersey Pound |
| JMD | Jamaican Dollar |
| JOD | Jordanian Dinar |
| JPY | Japanese Yen |
| KES | Kenyan Shilling |
| KGS | Kyrgystani Som |
| KHR | Cambodian Riel |
| KMF | Comorian Franc |
| KPW | North Korean Won |
| KRW | South Korean Won |
| KWD | Kuwaiti Dinar |
| KYD | Cayman Islands Dollar |
| KZT | Kazakhstani Tenge |
| LAK | Laotian Kip |
| LBP | Lebanese Pound |
| LKR | Sri Lankan Rupee |
| LRD | Liberian Dollar |
| LSL | Lesotho Loti |
| LYD | Libyan Dinar |
| MAD | Moroccan Dirham |
| MDL | Moldovan Leu |
| MGA | Malagasy Ariary |
| MKD | Macedonian Denar |
| MMK | Myanma Kyat |
| MNT | Mongolian Tugrik |
| MOP | Macanese Pataca |
| MRO | Mauritanian Ouguiya (pre-2018) |
| MRU | Mauritanian Ouguiya |
| MUR | Mauritian Rupee |
| MVR | Maldivian Rufiyaa |
| MWK | Malawian Kwacha |
| MXN | Mexican Peso |
| MYR | Malaysian Ringgit |
| MZN | Mozambican Metical |
| NAD | Namibian Dollar |
| NGN | Nigerian Naira |
| NIO | Nicaraguan Córdoba |
| NOK | Norwegian Krone |
| NPR | Nepalese Rupee |
| NZD | New Zealand Dollar |
| OMR | Omani Rial |
| PAB | Panamanian Balboa |
| PEN | Peruvian Nuevo Sol |
| PGK | Papua New Guinean Kina |
| PHP | Philippine Peso |
| PKR | Pakistani Rupee |
| PLN | Polish Zloty |
| PYG | Paraguayan Guarani |
| QAR | Qatari Rial |
| RON | Romanian Leu |
| RSD | Serbian Dinar |
| RUB | Russian Ruble |
| RWF | Rwandan Franc |
| SAR | Saudi Riyal |
| SBD | Solomon Islands Dollar |
| SCR | Seychellois Rupee |
| SDG | Sudanese Pound |
| SEK | Swedish Krona |
| SGD | Singapore Dollar |
| SHP | Saint Helena Pound |
| SLL | Sierra Leonean Leone |
| SOS | Somali Shilling |
| SRD | Surinamese Dollar |
| SSP | South Sudanese Pound |
| STD | São Tomé and Príncipe Dobra (pre-2018) |
| STN | São Tomé and Príncipe Dobra |
| SVC | Salvadoran Colón |
| SYP | Syrian Pound |
| SZL | Swazi Lilangeni |
| THB | Thai Baht |
| TJS | Tajikistani Somoni |
| TMT | Turkmenistani Manat |
| TND | Tunisian Dinar |
| TOP | Tongan Paanga |
| TRY | Turkish Lira |
| TTD | Trinidad and Tobago Dollar |
| TWD | New Taiwan Dollar |
| TZS | Tanzanian Shilling |
| UAH | Ukrainian Hryvnia |
| UGX | Ugandan Shilling |
| USD | United States Dollar |
| UYU | Uruguayan Peso |
| UZS | Uzbekistan Som |
| VEF | Venezuelan Bolívar Fuerte (Old) |
| VES | Venezuelan Bolívar Soberano |
| VND | Vietnamese Dong |
| VUV | Vanuatu Vatu |
| WST | Samoan Tala |
| XAF | CFA Franc BEAC |
| XAG | Silver Ounce |
| XAU | Gold Ounce |
| XCD | East Caribbean Dollar |
| XDR | Special Drawing Rights |
| XOF | CFA Franc BCEAO |
| XPD | Palladium Ounce |
| XPF | CFP Franc |
| XPT | Platinum Ounce |
| YER | Yemeni Rial |
| ZAR | South African Rand |
| ZMW | Zambian Kwacha |
| ZWL | Zimbabwean Dollar |