Unbxd Analytics
Unbxd Analytics is a simple tracking algorithm that can be easily implemented on your ecommerce store for tracking visitor events.
What are Events?
The actions a visitor takes on your ecommerce store are known as Events. Following are the different events we track on your online store:
- Visitor
- Search
- Product Clicks
- Add to Cart
- Orders
- Product Page View
- Dwell Time
- Facets
- Cart Removal
- Search Impression
When a visitor browses through your store, the integrated trackers log everything visitors do, the products they visit, orders, even the various store properties they interact with. We take that information, analyze it, and assemble a detailed profile of the visitor. We know their browsing patterns, preferences and can even determine your susceptibility to merchandising campaigns. The trackers are unique tracking codes that must be configured onto the store properties that yield an interaction. We call this interaction as an "event", for example, on the "Add to Cart" button.
The visitor profiles helps fetch relevant and personalized products as search results. It also helps in generating detailed reports.
For Unbxd Ecommerce Search to function correctly on your site, Unbxd Analytics must be configured.
How to Integrate?
The conventional way to integrating Unbxd Analytics is simple 2-step process which involves:
- Inserting a JavaScript code.
- Tracking events.
1. Inserting the JavaScript Code
Your first step is to insert a JavaScript code within the
tag of the all the pages in your website. This JavaScript code is responsible for making calls to our servers. The JavaScript code will not affect the page load time as it is loaded asynchronously.JavaScript Code
<script type="text/javascript">
/* * * CONFIGURATION * * */
var UnbxdSiteName = "<Site Key>";
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var ubx = document.createElement('script'); ubx.type = 'text/javascript'; ubx.async = true;
ubx.src = '//d21gpk1vhmjuf5.cloudfront.net/unbxdAnalytics.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ubx);
})();
</script>
<Site Key>
: Your Site Key.
2. Tracking Events
After you have inserted the JavaScript code, your next step is to insert event trackers across your website in order to track the various visitor actions on your website. Unbxd provides dedicated HTML codes for tracking each event. These codes must be inserted in the required site properties.
Event Tracking Parameters
Parameter | Description |
---|---|
SKU_ID or pid | The SKU or uniqueID (UID) of the product. If you have product variants in your catalog, do not use variant ID in place of SKU ID. |
PRANK: | The rank of a product in the results. Product ranking is done by our search engine based on relevancy. |
PRICE: | Price of the ordered product. |
dwellTime: | time spent on the product description page (type long). |
QTY: | Quantity of the ordered SKU or UID. |
pids_list: | List of newly loaded PIDs or UIDs (type Array of String) . |
Visitors
This event is tracked to identify "first-time" and "repeat" visitors and thereby help track other events. Every time the visitor event is fired, this information is extracted from the visitor’s browser cookie which contains a “visitType” parameter (also used by other events) that is set to "first-time" or "repeat".
This cookie has an expiry time of 30 mins. Once expired, the cookie is reset with new "visitType" value. This means, if a visitor sticks around for more than 30 minutes, he will no longer be "first-time", but a "repeat" visitor.
You do not have to track visitor events separately as the JavaScript code added earlier tracks it out-of-the-box.
Search
- Typing the query.
- Pressing Enter or Clicking the Search button .
<input placeholder="Search" unbxdattr="sq" />
<button type="submit" unbxdattr="sq_bt">Search</button>
Clicks
Tracking the products visitors click helps our search engine to understand their preferences over the other products in the search results. The collated click information is then used to render relevant and personalized search results. It is also used for generating popular products. Insert the below code in product containers (`div`) across the site:
<li unbxdattr="product" unbxdparam_sku="SKU_ID">
You would also need to track products displayed as the search results for a query. The below code must be inserted within the <li>
tag for all the search result pages:
<li unbxdattr="product" unbxdparam_sku="SKU_ID" unbxdparam_prank="PRANK"></li>
Cart Additions
Our analytics engine learns about your visitor’s from tracking the products added to their cart. This helps us rank products better. Inserting the code below on every Add to Cart button in your site would initiate the tracker:
<input unbxdattr="AddToCart" unbxdparam_sku="SKU_ID">
Tracking Orders
The below tag needs to be inserted in the order confirmation/success page. This tag must be added in the li
tag for an ordered product:
<li unbxdattr="order" unbxdparam_sku="SKU_ID" unbxdparam_price="PRICE" unbxdparam_qty="QUANTITY"</li>
Tracking Product Page View
Product Page Views is used to specify the total number visits to the "product detail page" of a product. To track "product page views" configure the below code in your ecommerce store.
UnbxdAnalyticsConf['pid'] = <pid>
- pid - uniqueId of the product (type String)
Tracking Dwell Time
Dwell time specifies the visitor's duration of stay on a particular product detail page. To track dwell time for a particular product configure the below code in your store:
UnbxdAnalyticsConf['pid'] = <pid>
- pid: uniqueId of the product.
Tracking Facet
At Unbxd, the more data we capture, more relevant the results would be. That is why tracking facet interaction on a result page becomes essential for building a comprehensive profile for a visitor that helps in fetching relevant results.
To track the facets on the results listing page configure the following code as instructed:
UnbxdAnalyticsConf[query]
<input unbxdparam_facetname="<facet field>" unbxdParam_facetValue="<field value>" checked>
<input unbxdparam_facetname="color" unbxdParam_facetValue="red" checked>
Tracking Cart Removal
Like "Cart Additions", tracking "cart removal" is also important as it helps us better understand the visitor's field preferences. Configure the following code as instructed to track when visitors remove a product from her/his cart.
<button unbxdAttr="RemoveFromCart" unbxdParam_sku="<SKU_ID>" unbxdParam_qty="<qty>">
<button unbxdAttr="RemoveFromCart" unbxdParam_sku="<00041>" unbxdParam_qty="<1>">
Tracking Search Impressions
Search impressions refer to the event when search results are loaded on a page. This event is tracked to track the different products loaded for a search query. In case of an infinite scroll, search impression will be tracked on every page scroll.
Unbxd.track('search_impression', {query : <query>, pids_list : <pids_list>})