Skip to main content

Conversion Tracking

Note:

If you have both One-to-many and One-to-one integrated on the same website, you only need to implement Bambuser Conversion Tracker once.

How to integrate Bambuser's tracking library for Conversion Tracking

This document covers how to add tracking of attributable purchases to improve the quality of your Bambuser Live Shopping statistics.

Introduction

Bambuser Conversion Tracking gives you valuable insights for the One-to-One shopping experience and performance. The Bambuser Conversion Tracker enables merchants to capture relevant sales related actions from customers that have participated in a One-to-One call. The number of attributed sales will also be displayed on the stats page.

For these purposes, Bambuser provides a small code snippet that needs to be added to the order confirmation page a.k.a. 'thank you' page.

How it works

img

Cookies

Bambuser Live Shopping Player and Call Widget automatically sets the cookies below. These cookies are used by the Bambuser Conversion Tracker to find out whether a purchase is relevant to a LiveShopping show/call. If the below cookies exist and are valid, the purchase is considered as a conversion and is tracked to the stats. If cookies are restricted, removed, or expired, Bambuser Conversion Tracker does not track the purchase.

NameExpiration dateProductDescription
_bamls_cuid1 year
  • 1:M
  • 1:1
Unique identifier for the merchant. Used as a common denominator for all tracking performed by Bambuser to easily enable reporting and dashboards per merchant.
_bamls_usid1 year
  • 1:M
  • 1:1
Unique identifier for a user. Used to attribute Bambuser statistics to a single site user.
_bamls_seid30 min
  • 1:M
Unique identifier for a session in which a Bambuser show was watched. Used in tracking to attribute statistics to a single session.
_bamls_caid30 days
  • 1:1
Unique identifier for the last Bambuser One-to-One call that the user had on the merchant site. Used to attribute Bambuser statistics to a specific customer interaction.
_bamls_shid30 days (Configurable)
  • 1:M
Unique identifier for a Bambuser show. Used to attribute statistics to a single show. This also - similar to source/medium in Google Analytics - enables attribution of purchases (that do not occur within the embedded stream) towards the show.
_bamls_lits30 days (Configurable)
  • 1:M
The timestamp for the last known interaction in a Bambuser show. This is used in conjunction with _bamls_shid to measure at what point in time after a user viewed a show, the actual purchase was made.

note

The cookies are automatically set by Bambuser Live Video Shopping Player and Call widget.

Disclaimer

None of the cookies include any personally identifiable information (PPI). Bambuser does not collect any personal data.

Implementation

GTM If you are using Google Tag Manager, see Bambuser LiveShopping GTM template.

The implementation is as simple as adding the below JavaScript code to your 'order confirmation' page. Additionally, you only need to populate the order information to the code.

Global Servers

Tracking library URL is different depending on location of servers that your dashboard is set up on. Use Global servers URL https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js if the login to your Bambuser dashboard is on following link: https://lcx.bambuser.com/.

  <script>
// Your existing purchase handling function
function onPurchase() {

// Properties below should be named in this exact way!
// Replace the values
var data = {
event: "purchase", // value needs to be “purchase”
orderId: "12345", // the order id (String)
orderValue: "12345", // total of all products in the order (Number or String of numbers)
orderProductIds: "11,22,33,44,55", // comma-separated string, or array of all product ids in the order
currency: "USD", // the currency used for the order (ISO 4217)
};

// Send the data to Bambuser
window._bambuser.collect(data);
}

// Load the tracking library and sec invoke onPurchase() method
(function(){
var bamSrcElm = document.createElement('script');
bamSrcElm.src = 'https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js';
bamSrcElm.onload = onPurchase;
document.head.appendChild(bamSrcElm);
})();
</script>

You can add the script above to your 'Purchase Confirmation' in different ways:

  • Add it directly to your application code
  • Inject it through a tag manager such as GTM, Tealium, and Adobe Analytics

Make sure you initialize the orderId, orderValue, orderProductIds, currency, and country fields with valid data from the order.

note

Bambuser Conversion Tracker is a separate integration from the Call Widget integration. You will need to separately install the Conversion Tracker on your purchase confirmation page.

Google Tag Manager template

If you are using Google Tag Manager, you can implement Bambuser Conversion Tracker using a GTM template tag.

Requirements

  • GTM container installed on the purchase confirmation page
  • A Trigger for when an order is completed (purchase confirmation page)
  • Variables to retrieve the order details below:
    • Order ID String
    • Order value (total price of the order) Number
    • Order currency String
    • IDs of products in the order String/Array

Installing the Bambuser Live Shopping tag

Our tag is available on Google Tag Manager Community Template Gallery. To find it, you simply:

  1. Go to "Templates" in the left hand side menu
  2. Under "Tag Templates", press the Search Gallery button
  3. You should now see the "Import Tag Template" view. Either search for (search icon in the top right) "Bambuser Live Shopping" or simply scroll down until you find it and click on it.

You should now see the view below. Click "Add to workspace" and confirm the required permissions by pressing "Add" in the popup that appears. That's it!

img

note

We may update the tag. When we do, you will be notified in Google Tag Manager that an update is available.

Set up a tag

  1. Create a new tag
    On the Tags page, click on New to create a new tag. Choose "Bambuser Live Shopping" as the tag type (found under "Custom" when creating a new tag).

  2. Populating the tag
    img The tag requires four data points (likely from GTM variables) in order to send purchase data:

    • Order ID
      • The ID of an order/transaction e.g. 'BM-GR-00123'
    • Order Value
      • Total value of the order, e.g. 1000
    • Currency
    • Product IDs
      • A comma-separated string or an array of product IDs that were part of the Order.
        E.g. '123,456,789' or ['123', '456', '789']
    • Settings
      • Enable debug mode
        • When the tag is fired, it logs all the steps and errors in the browser console.
      • Custom Tracking Library URL
        • By default Tracking library is set to https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js. This is the URL used if your dashboard is set up on Global Servers (Your login to Bambuser dashboard is on https://lcx.bambuser.com/). In this case you do not need to populate this field.
        However, if your dashboard is set up on EU Servers (Your login to Bambuser dashboard is on https://lcx-eu.bambuser.com/), you should instead override the URL by using Custom Tracking Library EU. In that case, you need to set it to https://cdn.liveshopping.bambuser.com/metrics/bambuser-eu.min.js.
  3. Set a trigger for the tag
    Bambuser Conversion Tracker script should be run when a purchase is completed. Therefore, you need to have a trigger to fire the tag whenever a purchase is confirmed and the order data is available. img

  4. Save the tag


Verification

It is a good practice to verify the implementation by placing a test order.

Here are the steps:

  1. Enter a 1:1 call
  2. Open the browser DevTools (inspect), head to the Network tab, and leave it open
  3. Complete the checkout and proceed to the order confirmation page
  4. Check the Network tab in the DevTools and filter by 'metric'
  5. Find the request to Bambuser /metric endpoint that includes the purchase data in the request payload, as below: img
  6. Make sure all the sent data is correct and has the expected data types according to the requirements.
  7. If you are unable to verify the order being tracked, head over to the troubleshooting checklist.

Troubleshoot

If you place a test order but cannot see the sales data under the Stats page (in the dashboard), here is a checklist to find and address the issue. You will need to use your browser DevTools for the below troubleshooting:

  1. Confirm that Bambuser Tracking Library is loaded from https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js on your order confirmation page, before your purchase script/the GTM tag is fired. img

  2. Make sure you have the necessary cookies set in your browser as shown below. img If the required cookies are missing, you need to enter a call in the same browser session; then the Call widget automatically sets the necessary first-party cookies in the browser.

  3. Watch the network calls when completing the purchase. There must be a metrics call to https://cl.liveshopping.bambuser.com/metric with the 200 status. The request payload must contain the purchase data. See images below:

    img

  4. Check in the browser console if there are any errors that may cause the Conversion Tracker script to not execute.

note

Do you still have issues with the Conversion Tracker?
Contact support@bambuser.com, mention that you have checked the above, and include your implemented code, screenshots, and if possible, a guide on how to place test orders on your site. We can help you debug and solve the issue.

Checkout on a subdomain

You will need an extra configuration if your checkout page is served under a subdomain of your main domain.
For example:

  • The player is embedded on https://example.com or https://www.example.com
  • But the checkout page is served under https://checkout.example.com

By default, the cookies created by the Call Widget will not be accessible from the pages served under subdomains. You can make the cookies accessible on both the main domain and its subdomains (*.example.com) by configuring domain attribute for cookies in the player configuration. Set the domain name without the protocol (https:// part) and prefixing it by a dot (.example.com).

Example:

let oneToOneEmbed = new BambuserOneToOneEmbed({
cookie: {
// Keep the dot prefix to allow cookies to be read from example.com and *.example.com
domain: '.example.com'
}
});

Conversion tracking FAQ

If a user has disabled/remove cookies, the conversion tracking will not work for that particular user. However, the user experience on the player will be the same.

No. When a customer joins a call from the One-to-one Call widget, the Bambuser cookies are set on the user browser session.

All purchases from the same user will be tracked in a 30-day window after the last user interaction.

  • orderID is currently used for identifying "duplicate rows" as we may recieve duplicate purchase data.
  • orderProductId will be used for future features.