Tracking Conversion

📘

Defining conversion events

Sending an event named 'conversion' will provide feedback to our system. conversion_t is used to classify different events so that you can get detailed breakdown of events.

Conversion events are optional but make sense for e-commerce and B2B customers. Feel free to get in touch with the LiftIgniter team at [email protected] to discuss your conversion typology.

If you do not have any conversion events to send, you can skip this section.

Think of our JS SDK as a Google Analytics script. In principle, you can track ANY custom events that you would like us to look into - and we can use conversion or engaged events as an activity for training our model.

Using $p("send") at the time conversion/engagement occurs will allow our system to track the event.

// Send conversion event
// Track Twitter Follow
$p("send", "conversion",{
  // Context object.
  // If you want to say that the conversion is from LiftIgniter and conversion type
  source: "LI",
  conversion_t: "twitter follow"
})

// Send conversion event
// Track ecommerce conversion
$p("send", "conversion",{
  // Context object.
  // If you want to say that the conversion is from LiftIgniter and conversion_t
  source: "LI",
  conversion_t: "add to cart",
  id: "PRODUCT_ID",
  price: 1.0
})

$p("send", "conversion",{
  source: "LI",
  conversion_t: "purchase",
  id: "PRODUCT_ID",
  price: 1.0
})

// Send engagement event
// Track video engagement activity (i.e. watch 20% of video)
$p("send", "engaged",{
	source: "LI",
  conversion_t: "video complete"
})

Code above will send us conversion event and engaged event respectively. If you are sending us conversion on an e-commerce site, make sure you include the product ID on the id field by the item identifier you are using to store on our side.

As usual, the value of context object can be any data type that's supported by us (Number, String, and Array of String). conversion and engaged are events commonly tracked by our system. But if you want us to consider anything else into the model, then please contact us about it and we can look into it.

How to decide the source

If you are running an A/B test, and attributing only the conversions due to a click on LI widget as "LI", then we recommend labelling the source as "base" for conversion from same widget on alternative A/B slice. You can name any other conversion sources as "other", or any identifier that you can recognize.

If you don't have the capacity to implement such a granular tracking for conversion, then you can simply label all conversions for users on LI slice as "LI" and alternative as "base" to compare the overall numbers.

How to identify items were added due to LiftIgniter click

You can use this solution if you don't internally track what the users clicked on.

On the user's local storage, _igClkHis key stores a stringified JavaScript string array. This array keeps track of 10 most recent things a user has clicked on for a given widget. Each of the string value in the string array is a pipe ('|') separated value that contains the URL user clicked on, name of the widget clicked from, and source (who served the algorithm. Default base or LiftIgniter LI).

You can use this to keep track of conversion based on direct click. Deeper investigation (i.e. how does having the widget shown affect conversion and etc) can be done on our end.