Skip to main content

Getting started

To see how FAQs and chat conversations contribute to purchases, simply add the API connection called E-commerce Tracker. Once the connection is established and the script is running, it checks whether a chat has occurred and whether an FAQ has been displayed. The information is then sent to admin.imbox.io/api/analytic/ecommerce and displayed along with the chat/FAQ - yes/no.

Ecommerce tracking script

This is what the function looks like with the parameter names, and you can send different variables to the empty parameters to measure what needs to be measured:

<script type="text/javascript">
var _imbox = _imbox || []
_imbox.push([
"insertTrans",
"Transaction Id",
"Affiliation",
"Price",
"Product name",
"Custom1",
"Custom2"
])
</script>

This is an example of what can be submitted and where it will be displayed in the table:

<script type="text/javascript">
var _imbox = _imbox || []
_imbox.push([
"insertTrans",
"76379",
"DK",
"346.70",
"1",
/* Number of products instead of name. Read below */ "7637",
"Custom 2"
])
</script>

As we use the Transaction Id as the ID, it needs to be unique each time the script runs. Typically, all products in an order are grouped together in the same function call. To avoid confusion over the name of the purchased product, it is recommended to only display the number of products purchased and the total order value.

Data for Ecommerce Tracker

The image below is taken from the Admin panel, where you can see how the data is presented:

Ecommerce transactions

  1. Transaction Id = A unique ID for each transaction must be generated every time. Our recommendation is to use the order number, ensuring that each transaction has a unique ID. If the order number is not available, for example, with getOrderID, then generate a random number.
  2. Affiliation = Optional text that may provide useful information for measurement purposes, such as the source, domain, device, etc.
  3. Price = 100.00, i.e. some value for the transaction/conversion. Here the variable containing the price is set, for example, getPrice.
  4. Product Name = Use, for example, getProductName.
  5. Custom1 or 2 = Optional text that may be useful for measurement purposes, such as colors, size, campaign, currency, payment method, and so on.

You can find all ImBox open API connections in the following documentation: https://imbox.se/docs/online/dokumentation-v2/