See our other products: BotEngine - chatbot platform | chat.io - customer messaging platform | KnowledgeBase - help center for website

Help and support

Resources that will teach you everything about LiveChat.

Sales Tracker: Monitor the value of your chats

by Jacob Firuta

The Sales Tracker can show you which chats, agents and products have the biggest impact on your revenue. Add the Sales Tracker to your product pages and see how the revenue flows through after chats with agents!

What is a Sales Tracker? It’s a piece of code that tracks which chats end with sales. You add it to a page that passes a sale property, for example, your shopping cart or thank-you page.

Whenever a customer who has chatted with you or one of your agents reaches that page, the Sales Tracker will pick up on it and attribute that chat with the sale’s value. This way, you know which chats led to purchases.

Note: The Sales Tracker works with the Embedded Chat window only.

How to install a Sales Tracker

To start tracking the value of your chats, follow these steps:

  1. Go to the Sales Tracker settings and click on the Add a new Sales Tracker button.
Creating a LiveChat Sales Tracker
  1. Next up, you need to name your Sales Tracker. Pick a name you’ll be able to easily recognize later on in your Archives and Reports.
  2. You will need to pick a tracking method – the way the Sales Tracker will attribute chats with sales. There are three to choose from:

    • Static: Each registered purchase is worth the same. This works well if you’re selling a single product or if you want to set separate trackers for different products. No matter the purchase value, the chat will be credited the same, set amount every time.
    • Dynamic: The order value is captured from your website code whenever a customer makes a purchase. This works well when implemented in your ecommerce cart. Every time a customer finalizes a purchase, the tracker will grab information like order value on the fly.
    • Non-monetary: Choose this tracking method if you don’t want to assign any specific value to a chat but you still want to tie the purchase property to the conversation. This can be useful for calculating conversion levels.
Picking a tracking method for the LiveChat Sales Tracker
When you choose the dynamic option, you also need to let LiveChat know which global variable contains the information about the order. If the variable is not present in your code, LiveChat won’t be able to pick up on it. If you don’t know how to do this, get your website developer involved.

The value you pass should be in the following format: 1000.99 – a point as the decimal mark, no thousands separator, no currency information (that will be passed separately).
  1. When choosing either Static or Dynamic, you will also get a chance to pick the currency in which the sale will be reported.
  2. No matter which method of tracking you pick, you also get the option to add an order ID parameter to the chat.
Entering order ID parameter for the LiveChat Sales Tracker
If you decide to include the order ID parameter, you will need to point to a order ID parameter property in your website code (similar to the dynamic tracking method). If you don’t know how to do this yourself, please contact your website developer.
  1. After you’ve chosen a tracking method, you need to specify how long the tracker should be active for. By default, it’s set to 30 days. This means that any purchase made within 30 days of a chat will credit the chat.
  2. Click on Generate Sales Tracker to complete the creation process.
Generating the tracker code for the LiveChat Sales Tracker
  1. If everything checks out, copy the tracker code to clipboard and paste it before the ending </body> tag on the product or cart page.
Getting the tracker code for the LiveChat Sales Tracker

After the last step is completed, all the sales made on the page coming after a specific chat will credit the chat. This way, you can learn how much money a specific product makes and how big of a contribution your LiveChat is to your bottom line.

The purchase information is available in Archives for all chats that ended with a successful sale (they will be marked with a shopping cart icon). You can also track the results of all purchases in the Sales Tracker report.

How Sales Tracker works in practice

Here’s an example scenario that should give you a better idea how the Sales Tracker works.

Let’s say that you have an online store selling shoes. You want to see how big of an impact LiveChat makes to your bottom line so you decide to use a Sales Tracker.

You add it to your shopping cart page to capture purchase information to tie it to chats.

To do that, you go to the Sales Tracker options (step 1), create a new Sales Tracker (step 2) and choose the Dynamic method of tracking customers (step 3).

The Dynamic option requires an additional global variable where you keep the order’s value. The same parameter needs to be present in your website’s code.

You want to have the purchases reported in US Dollars so you pick that option too (step 4).

You also want to add the order ID information to each chat to add some context to them (step 5).

Finally, you set the lifetime of the attribution to 10 days (step 6), which means that each sale made within 10 days of a chat will credit that chat.

After the tracker is ready (step 7), you add it to your shoe shop (step 8) thank-you page to capture sales data.

Any custom modifications of the LiveChat tracking code can potentially cause issues with the Sales Tracker. If you do encounter any problems, make sure to let us know!

Now, let’s say that a customer buys $200 worth of shoes and other merchandise after a chat with you. You will be able to see the order information and value in the chat Archives. It will also show up in the Sales Tracker report in the Reports section.

Bare in mind that one chat can lead to multiple sales. This can lead to a situation where you have more sales than chats with sales in the Sales Tracker report.

If the sales tracker is giving you any trouble, feel free to chat with us and we’ll help you set it up!

Tracking sales on a dynamic page

If you have a website that is loaded dynamically (for example, on one page) and you don’t have the order information immediatelly, you can still use a Sales tracker.

Let’s say that you have an order form where a customer makes a purchase. You can make a request that will return a LiveChat JS API method updating the Sales tracker in the response.

Here’s an example on how you can do it. Let’s say you have a request that is made whenever a customer makes an order similar to this:


$.ajax({
    "type" : "post",
    "url" : "/api/signup",
    "data" : $filledForm.serialize(),
    "dataType" : "json",
    "success" : function(data) {
        showConfirmation("ok");
    },
})

When the request succeeds, you get something like this with a confirmation that the request/order went through:


$('#myForm')
.ajaxForm({
    url: "/api/signup",
    dataType: 'json',
    success : function (response) {
        showConfirmation("success");
        LC_API && LC_API.trigger_sales_tracker('KcmbUeRo9eMIYyIynT8IMJeZiB4GuB9P', [
            {name: '__order_price', value: 999},
        ]);
    }
});

As you can see, this response comes with a request for the Sales tracker:


LC_API && LC_API.trigger_sales_tracker('KcmbUeRo9eMIYyIynT8IMJeZiB4GuB9P', [
    {name: '__order_price', value: 999},
]);

It uses the LC JS API method trigger_sales_tracker that triggers the Sales tracker and credits any chats that led to the order.

When you add the callback in the resposne to your order, it will be tracked without having to rely on a ‘thank-you’ page.

Did you find this helpful? Yes No
Thanks for your feedback.
67% of people found this helpful.

Start free LiveChat trial!

5-minute setup, test out the Team plan features for 30 days, no credit card required.

Rate us! Rate this chat to help us become better support. +