- Prepare your Schema
- Prepare your Catalog
- Upload your Feed
- Full Feed Upload
- Delta Feed Upload
- Single Record Upload
- Check Product Count
- Visitors
- Introduction to GTM
- Requirements
- Events
- API Integration
- Search Endpoint
- Authentication
- Header
- Request Parameter
- Response Components
- Explanation Request Parameter
- PDP API Format
- Sample Request
- Request Parameters
- Response Parameters
- System Requirements
- Install SDK
- Initialize SDK
- Unbxd Commerce Search
- Integrating Unbxd Autosuggest
- Unbxd Analytics
- Unbxd Browse
- Unbxd Recommendations
- Sample App
- Installation
- Unbxd Analytics
- Unbxd Commerce Search
- Unbxd Autosuggest
- Unbxd Browse
- Unbxd Recommendations
- Sample iOS App
- Quickstart with Unbxd Template
- Quick Integration to your site
- Detailed Guide
- Authentication
- Types of Pages to Render
- Configuring the Page
- Instance Methods
- More Information
- Available Configurations
- Libraries
- QuickStart
- Authentication
- Configuring Autosuggest
- Sample Options Object
- Handlebar Functions
- List of Configs
- Search Template
- Loader Config
- Facet Config
- Pagination
- Spellcheck
- Sort Config
- PageSize Config
- Breadcrumb Config
- Product Views
- Variants
- Quick Integration with Unbxd template
- Quick Integration to your site
- Installation
- Authentication
- Types of pages to render
- Configuring the page
- PageSize Config
- More Info
- Create an Unbxd Account
- Create an Unbxd Site
- Upload a Catalog
- Setup Search
- Integrate Search
- Create an Unbxd Account
- Create an Unbxd Site
- Upload a Catalog
- Setup Search
- Integrate Search
- Plugin Installation
- Configuration
- Uninstallation
- Test Plugin Installation
- Installation
- Authentication
- Catalog
- Catalog Sync
- Product Integration
- Custom Template
- Indexing Queue View
- Feed View
- Upgrade
- Uninstall
- Installation
- Authentication
- Catalog
- Cron Job
- Product Config
- Uninstall
- Installation
- Configuration
Browser Integration
Tracking visitor analytics and behaviour is essential in order to provide accurate and visitor-specific search and category page results. UNBXD analyzes visitor events, such as product clicks, products added to cart, orders, etc. These events are tracked using browser cookies. With this information, a profile is built for every visitor, based on his/her affinity to different categories, brands, or prices.
This information is then aggregated and analyzed for two purposes:
- Generating reports
- Providing relevant and personalized search & category pages results
The conventional way of integrating Unbxd Analytics is a simple two-step process:
Including unbxdAnalytics.js script:
Your first step is to insert a JavaScript code within all the HTML pages on your website.
The JavaScript code will not affect the performance of the page as it is loaded asynchronously. This code could be inserted anywhere in the page (header, body, footer) and need not be included in the head section of the HTML.
Sample Request
<script type="text/javascript">/* * * CONFIGURATION * * */ var UnbxdSiteName = "<Site_ Key>" ; // Replace the value with your 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>
Where,
Site_Key: A unique identifier provided when you create an Unbxd account. You can also get the Site Key from Manage > Configure Site > Keys from within the Console. This is a required field.
Additional Configurations
Apart from integrating Javascript configurations, there are other configurations that you should add for Search and Category Pages.
MANDATORY: It is mandatory to define the configurations for the search and category pages for creating Single-Page Applications (SPA).
For search results page
<script type="text/javascript">UnbxdAnalyticsConf=window.UnbxdAnalyticsConf ||{};UnbxdAnalyticsConf["query"]="nike"; </script>
For Category Page
<script type="text/javascript"> UnbxdAnalyticsConf=window.UnbxdAnalyticsConf||{}; UnbxdAnalyticsConf["page"]="categoryPath:\"level1>level2\"; UnbxdAnalyticsConf ["page_type"]="BOOLEAN"; </script>
Tracking Events
After integrating the configurations, you might want to track the analytics for all the events.
The events are tracked in two ways:
- Using HTML attributes: Insert custom HTML tags for tracking events. The Javascript works in tandem with the custom HTML attributes to identify and track events as they happen automatically.
- Using API Calls: Insert custom APIs for tracking different visitor events. These event-based API calls will track every event and store information within the Unbxd Cloud server until the browser cookies are cleared.
Unbxd . track ( type , params )
where,
type: “search”,”categoryPage”,”widgetImpression”,”click”,”addToCart”,”order”
params : parameters based on type of visitor event.
NOTE: In case of mobile SDK, Amazon Alexa or any kind of non-browser-based Unbxd integration, it is recommended that you use API-based analytics integration.
Events
Events are any action a visitor takes on your eCommerce store.
Once deployed, the JS code tracks shopper events, using information stored within a cookie titled ‘unbxd.userId’. This file tracks, stores, and relays useful session-based information to Unbxd.
This section helps you understand more about the session-based events we track, like:
- Visitor: Identifies new and returning shoppers
- Search Hit: Is the search query performed on the web page
- Category Page Hit: Category pages are the product listing pages, a visitor visits while browsing on the ecommerce website. For example, pages for categories such as Women -> Dresses, Men ->Shirts, etc on the website. These are also called browse or navigation pages. This event tracks the number of visits for a particular category page.
- Product Click: Is when a shopper clicks on a product in the PLP.
- Add to Cart: Is the number of times shoppers have added products to a cart.This event can be fired from both PDP and PLP.
- Orders: Is the number of orders that have been successfully completed
- Product Page View: Is the number of times a shopper has visited a specific Product Details Page (PDP)
- Cart Removal: Is the number of times a shopper has removed a product from the cart
- Recommendation Widget Impression: Is every time the recommendations widget loads with results
- Search Impression: Is every time the search results page loads products on the PLP
- Dwelltime: Is the time a shopper has spent on a product page
- Facets: Are filters applied for search or browse events
Visitor
The Visitor event is the first event that gets created when a shopper visits your site.
There are two types of shoppers we track:
- First-time shoppers
- Repeat shoppers
All shopper events are tracked against an anonymous User ID that is allotted to every shopper visiting your site.
Site-level information, like the “userID”, “sessionId”, and “visitType” parameter, are stored in three cookies titled:
- ‘unbxd.userId’
- ‘unbxd.visitId’
- ‘unbxd.visit’
All these files are created when a shopper visits your site for the first time.
A shopper is labeled first-time visitor when:
- Shopper has visited your site for the first time.
- Unbxd.userId gets created.
- Unbxd.visitId with a new value and Unbxd.visit cookie with value “first_time” is created.
All the subsequent actions of the user will be captured as that of first time user until there’s an idle period of 30 minutes or more.
- If the shopper clears all the cookies then the cookies are downloaded again.
A shopper is labeled repeat visitor when:
Shopper returns to the site and only Unbxd.userId cookie is set.
Unbxd.visitId with a new value and Unbxd.visit cookie with value “repeat” is created.
All the subsequent actions of the user will be captured as that of a repeat user.
The User ID is a random numerical value with the timestamp of the visit and is device/browser-specific. For instance, a shopper accessing your site on Google Chrome and Mozilla Firefox on the same computer will have two different values for this cookie for each browser.
NOTE: The ‘unbxd.visitID’ and the ‘unbxd.visit’ cookies are set to expire after 30 continuous minutes of inactivity. If a shopper returns to your site after the cookie expires, that shopper will be a ‘first-time shopper’.
If you have integrated the Unbxd analytics JS code, this event is tracked and pushed automatically, with no further action required.
Search Hit
The Search event is generated every time a shopper uses the search bar to search for a product on your site.
This event query will have the following pieces of information:
- Keyword query
- Site name
- Web address
- Referrer
- Type of Visitor
- Version of the SDK
- Visit ID
- Action performed
- User ID
- Site Key
Custom HTML attributes
Insert the unbxdattr=”sq” attribute within the “`<input>“` tag of the search box to capture the search query typed by the shopper.
<input type="text" placeholder="Search" />
The “`unbxdattr=”sq_bt”“` attribute is inserted on the link or search button (usually the magnification/search icon) that triggers search at the backend.
Here’s how a typical response would look like
<button type = "submit" unbxdattr = "sq_bt" > Search </button>
Custom APIs
To track a shopper’s search hits, insert the following API query on the link or search button (usually the magnification/search icon):
Unbxd . track ( "search" , { "query" : <QUERY> })
Where,
query: Indicates the shopper’s search text
Here’s how a typical response would look like:
Unbxd . track ( "search" , { "query" : "dress" });
To track Autosuggest results through the Unbxd Analytics.js using HTML tags.
Autosuggest Types supported for tracking
- Unbxd Autosuggest types:
- Promoted Suggestions
- Keyword Suggestion
- Popular Products
- Top Search Queries
- In-Field
Attributes required to be set for Autosuggested HTML elements
- unbxdAttr = “autosuggest”
- unbxdParam_autosuggestType = “”
- unbxdParam_autosuggestSuggestion = “”
- unbxdParam_autosuggestFieldName = “”
Valid for autosuggest type IN_FIELD, eg. gender, for infield query gender: men - unbxdParam_autosuggestFieldValue = “”
Valid for autosuggest type IN_FIELD, eg. men, for infield query gender:men - unbxdParam_autosuggestSrcField = “”
Valid for autosuggest types INFIELD & KEYWORD_SUGGESTION, how the suggestion was generated. Eg. “color”, “color type”, “type” etc - unbxdParam_pid = “”
Valid for autosuggest type POPULAR_PRODUCTS, id of the product clicked - unbxdParam_pRank = “”
Rank of the suggestion
Integration Steps to add html attributes
- Promoted Suggestion:
{ unbxdAttr = “autosuggest” unbxdParam_autosuggestType = “PROMOTED_SUGGESTION” unbxdParam_autosuggestSuggestion = ”<suggestion_value>” unbxdParam_autosuggestFieldValue = null unbxdParam_autosuggestFieldName = null unbxdParam_autosuggestSrcField = null unbxdParam_pRank = (rank in the dropdown) unbxdParam_pid = null }
- Keyword Suggestion
{ unbxdAttr = “autosuggest” unbxdParam_autosuggestType = “KEYWORD_SUGGESTION” unbxdParam_autosuggestSuggestion = “<suggestion_value>” unbxdParam_autosuggestFieldValue = null unbxdParam_autosuggestFieldName = null unbxdParam_autosuggestSrcField = “<source_unbxd_fields>” unbxdParam_pRank = (rank in the dropdown) unbxdParam_pid = null }
- Popular Products
{ unbxdAttr = “autosuggest” unbxdParam_autosuggestType = “POPULAR_PRODUCTS” unbxdParam_autosuggestSuggestion = ”Monoprice Premium Hi-Fi DJ Style Over-the-Ear Pro Headphones with Mic” unbxdParam_autosuggestFieldValue = null unbxdParam_autosuggestFieldName = null unbxdParam_autosuggestSrcField = null unbxdParam_pRank = (rank in the dropdown) unbxdParam_pid = “1234” }
- Top Queries
{ unbxdAttr = “autosuggest” unbxdParam_autosuggestType = “TOP_SEARCH_QUERIES” unbxdParam_autosuggestSuggestion = “Headphones” unbxdParam_autosuggestFieldValue = null unbxdParam_autosuggestFieldName = null unbxdParam_autosuggestSrcField = “topQuery” unbxdParam_pRank = (rank in the dropdown) unbxdParam_pid = null }
APIs for tracking a suggestion
- Keyword Suggestion
Unbxd.track(“search”, {query: “dress”, autosuggestParams: { unbxdAttr:”autosuggest”, unbxdParam_autosuggestType:” KEYWORD_SUGGESTION”, unbxdParam_autosuggestSuggestion: “dress”, unbxdParam_autosuggestFieldValue: null, unbxdParam_autosuggestFieldName: null, unbxdParam_autosuggestSrcField: “category”, unbxdParam_pRank:”3”, unbxdParam_pid: null }});
- Popular Products
Unbxd.track(“search”, {query: “dress”, autosuggestParams: { unbxdAttr:”autosuggest”, unbxdParam_autosuggestType:”POPULAR_PRODUCTS”, unbxdParam_autosuggestSuggestion: “sequin pearl blue dress”, unbxdParam_autosuggestFieldValue: null, unbxdParam_autosuggestFieldName: null, unbxdParam_autosuggestSrcField: null, unbxdParam_pRank:”3”, unbxdParam_pid: “3425” }});
Product Click
The Product Click event is generated every time a shopper clicks on a product in a Product Listing Page (PLP) or in a recommendation widget. This helps us understand your shoppers’ search preferences. This information is analyzed to list and promote ‘Popular Products’ in the autosuggest dropdown and display personalized ‘Recommended For You’ recommendations.
There are two ways you can integrate the functionality to track product clicks:
- Custom HTML attributes
- Custom APIs
Custom HTML attributes
To display products within the PLP on the search results or category page, insert the following code snippet within <div> of product grid (product thumbnail) or within the <li> html tag.
Sample code snippet with <li> tags
<li unbxdattr="product" unbxdparam_sku="SKU001" unbxdparam_prank="1" unbxdparam_requestId="607a0bbf-179a-44af-8bdd-e58fef7fc5f3" ></li>
Sample code snippet within <div> tags
<div unbxdattr="product" unbxdparam_sku="SKU001" unbxdparam_prank="1" unbxdparam_requestId="607a0bbf-179a-44af-8bdd-e58fef7fc5f3"></div>
Where,
- unbxdattr: Specifies the type of event getting captured. For product clicks, the value is “product” always
- unbxdparam_sku: Specifies the uniqueId of the product as defined in the feed. You can get this from the Unbxd search API response
- unbxdparam_prank: Specifies the position of the product in the search results grid/list. When this value is not specified, the value of the product that appears first in the list will be 1, and the value of the product that appears second will be 2 and so on
- unbxdparam_requestId: Specifies the requestId which is the part of the response readers of the Search/Category API request
Tips: For enhanced tracking, set the following query information before loading Unbxd analytics tracking plugin on a search and category Product Listing Page.
For search results page
<script type="text/javascript">UnbxdAnalyticsConf=window.UnbxdAnalyticsConf ||{};UnbxdAnalyticsConf["query"]="nike"; </script>
For Category Page
<script type="text/javascript"> UnbxdAnalyticsConf=window.UnbxdAnalyticsConf||{}; UnbxdAnalyticsConf["page"]="categoryPath:\"level1>level2\"; UnbxdAnalyticsConf ["page_type"]="BOOLEAN"; </script>
To track “product click” in the recommendation widget,
You need to add:
- unbxdParam_experience_pageType: The PageType of the Page in which the experience widgets will be rendered.
List of PageTypes available:
- HOME
- PRODUCT
- CATEGORY
- CART
- BRAND
- unbxdParam_experience_widget: The widgetType of the rendered experience widget.
List of widgets available:
- WIDGET 1
- WIDGET 2
- WIDGET 3
- Tag with the corresponding recommendation widget
Custom APIs
Every time a shopper clicks on a product within a search results page, category page, or an Unbxd recommendation widget, the following API needs to be called.
<li unbxdattr="product" unbxdparam_sku="SKU001" unbxdparam_prank="1" unbxdParam_boxType="RECOMMENDED_FOR_YOU" unbxdparam_requestId = "607a0bbf-179a-44af-8bdd-e58fef7fc5f3" ></li>
Where,
- <PID>: uniqueID of the product as passed in the feed
- <PRANK>: rank at which the product appears among the search results for a query in the grid/list. The first product will have Rank 1 and so on
- <REQUESTID>: The unbxd request id returned in the response header of the search/category API call request.
NOTE: Even if your products have variants, please do not pass variant ID here We capture the click on the rolled-up entity and not on the individual variant on the search results page
Every time a shopper clicks on a product from a recommendation widget available within a search results page, category page, or a PDP, the following API needs to be called.
Unbxd.track("click",{"pid":"123","prank":"3","experience_pagetype":"HOME","experience_widget":"WIDGET2","requestId":"607a0bbf-179a-44af-8bdd-e58fef7fc5f3"})
Where,
- pid: Specifies the uniqueId of the product as defined in the feed schema
- prank: Specifies the position of the product in the search results grid/list. When this value is not specified, the value of the product that appears first in the list will be 1, and the value of the product that appears second will be 2 and so on
- experience_pageType: The PageType of the Page in which the experience widgets will be rendered.
List of PageTypes available:
- Home
- Product
- Category
- Cart
- Brand
- experience_widget: The widgetType of the rendered experience widget.
List of widgets available:
- WIDGET 1
- WIDGET 2
- WIDGET 3
- requestId: Specifies the requestId of the response to a Search/Category page API request
<script type="text/javascript">UnbxdAnalyticsConf=window.UnbxdAnalyticsConf||{};UnbxdAnalyticsConf ["page"]="nike";UnbxdAnalyticsConf ["page_type"]="CATEGORY_PATH"; </script>
Add to Cart
The Add to Cart (or known as Cart) event is generated when a shopper adds a product to the shopping cart.
There are two ways you can integrate the functionality to track Add to Cart clicks:
- Custom HTML attributes
- Custom APIs
Custom HTML attributes
To track the number of ‘Add to Cart’, insert the following code snippet on the ‘Add to Cart’ button within your HTML page.
<input unbxdattr="AddToCart" unbxdparam_sku="SKU001" unbxdparam_variant="VAR001" unbxdparam_qty="2" unbxdparam_requestId="607a0bbf-179a-44af-8bdd-e58fef7fc5f3">
Where,
- unbxdattr: Specifies the type of event getting captured. For the cart event,, the value is “AddToCart”
- unbxdparam_sku: Specifies the uniqueId of the product as defined in the feed
- unbxdparam_variant (optional): Specifies the uniqueID of the product variant added to the cart as defined in the feed schema. This parameter is a required field if the catalog has variants
- unbxdparam_qty (optional): The number of units added to cart. The default value will be 1 if no qty is specified
- unbxdparam_requestId: Specifies the requestId from the response of the search/category API. If the widget is not on the listing page, you can ignore this parameter., when products within the PLP widget has the Add to Cart button
Tips: For enhanced tracking, set the following query information before loading Unbxd analytics tracking plugin on a search and category Product Listing Page.
For search results page
<script type="text/javascript">UnbxdAnalyticsConf=window.UnbxdAnalyticsConf ||{};UnbxdAnalyticsConf["query"]="nike"; </script>
For Category Page
<script type="text/javascript"> UnbxdAnalyticsConf=window.UnbxdAnalyticsConf||{}; UnbxdAnalyticsConf["page"]="categoryPath:\"level1>level2\"; UnbxdAnalyticsConf ["page_type"]="BOOLEAN"; </script>
Custom APIs
To track every time a shopper clicks on the Add to Cart button for a product without variants, insert the following API code to the ‘Add to Cart’ button within your PDP’s HTML page to track products without variants.
Unbxd.track("addToCart",{"pid"=<PID>,"qty":<QTY>,"requestId":<REQUESTID>})
To track products with variants added to a cart, insert this API code:
Unbxd.track("addToCart",{"pid"=<PID>,"variantID"=<VID>,"qty":<QTY>,"requestId":<REQUESTID>})
Where,
- pid: The unique identifier of the product as defined in the feed schema
- vid (optional) : The unique identifier of the variant added to the cart as defined in the feed schema. If this field is not available, we will not be able to track variants
- qty (optional): The number of variants added to cart. If variants have not been added to the cart, the parameter value will be 1
- requestId: Specifies the requestId of the response, when products within the PDP widget has the Add to Cart button
Order
The Orders event is pushed for every product that is purchased on your site.
There are two ways you can integrate the functionality to track orders that have been successfully completed:
- Custom HTML attributes
- Custom APIs
Custom HTML attributes
To track a successful order, insert the following API code within the HTML tags on the order confirmation page on your site.
<li unbxdattr="order" unbxdparam_sku="SKU001" unbxdparam_variant="VAR001" unbxdparam_price="500" unbxdparam_qty="2"></li>
Where,
- unbxdattr: Specifies the type of event getting captured. For ordering the product, the value is “order”
- unbxdparam_sku: The unique identifier of the product as defined in the feed
- unbxdparam_variant (optional): Specifies the variantId of the product added to the cart as defined in the feed. This parameter is a required field if the catalog has variants
- unbxdparam_price: The amount of single unit a shopper has paid for the product/variant
- unbxdparam_qty: The number of products/variants purchased
Custom APIs
To track every successful order for a product without variants, insert the following API code to the order confirmation page.
Unbxd.track("order",{"pid":<PID>,"qty":<QTY>,"price":<PRICE>})
To track every successful order for a product with variants, insert this API code:
Unbxd.track("order",{"pid":<PID>,"variantID"=<VID>,"qty":<QTY>,"price":<PRICE>})
Where,
- pid: The uniqueId of the product as defined in the feed
- variantId (optional) : The variantId of the variant added to the cart as defined in the feed. If the product feed has variants, this parameter is required.
- qty (optional): The number of variants added to cart. If no value is specified, we will take the default value as 1
- price: The amount of a single unita shopper has paid for the product ordered
Product Details Page View
The Product Details Page (PDP) view indicates the total number of times a product has been visited by shoppers irrespective of the source; search result page, category page, search engine, email, marketing campaigns and so on.
This can be tracked by adding the following javascript snippet to each of the product description pages on your website.
<script type = "text/javascript"> UnbxdAnalyticsConf = window . UnbxdAnalyticsConf || {}; UnbxdAnalyticsConf [ 'pid' ] = <PID>; </script>
IMPORTANT: The "UnbxdAnalyticsConf[]" object needs to be set up before the "unbxdAnalytics.js" is loaded on Product Details Page.
Remove from Cart
This event tracks every instance a product is removed from cart as well. Information it helps us better understand the visitor’s preferences.
There are two ways you can integrate the functionality to track products that have been removed from the cart:
- Custom HTML Attributes
- Custom APIs
Custom HTML attributes
To track products being removed from cart, insert the following attributes within all “Remove from Cart” buttons on the cart page.
<button unbxdattr = "RemoveFromCart" unbxdparam_sku = "SKU001" unbxdparam_variant = "VAR001" unbxdparam_price = "500" unbxdparam_qty = "2">
where,
- unbxdattr: Specifies the type of event getting captured. For cart removal, the value is “RemoveFromCart”
- unbxdparam_sku : UniqueId of the product as defined in the feed
- unbxdparam_variant (optional): UniqueId of the variant as defined in the feed. This parameter is optional and is only needed if the catalog has variants
- unbxdparam_price: Price of the product/variant bought
- unbxdparam_qty (optional): Quantity of the product/variant bought
To track products being removed from cart, insert the following APIs within all “Remove from Cart” buttons on the cart page.
Unbxd.track ("cartRemoval",{ "pid":<PID>,"qty":<QTY>})
where,
-
<PID> : Unique ID or SKU ID of the product
-
<QTY> : Number of products that are removed from the cart
Recs Widget Impression
The Recommendations Experience Widget event is generated every time a recommendations widget is displayed on the page.
There are two ways you can integrate the functionality to track the product recommendations:
-
Custom HTML attributes
-
Custom APIs
Custom HTML attributes
To track a recommendations widget impression, insert the following HTML tag on the respective pages on your site.
<div unbxdAttr="product" unbxdParam_sku="SKUid" unbxdParam_experience_pageType="HOME" unbxdParam_experience_widget="WIDGET2" ></div>
Where:
-
unbxdAttr: Specifies the type of event getting captured. For the widget impression, the value is “product”
-
unbxdParam_sku: UniqueId of the product as defined in the feed
-
unbxdParam_experience_pageType:The PageType of the Page in which the experience widgets will be rendered.
List of PageTypes available:
- Home
- Product
- Category
- Cart
- Brand
- unbxdParam_experience_widget: The widgetType of the rendered experience widget.
List of widgets available:
WIDGET 1
WIDGET 2
WIDGET 3
Custom APIs
To track the recommendations widget impression, insert the following API code to the respective pages on your site.
Unbxd.track("experience_impression", {"experience_pagetype":"PDP", "experience_widget" : "WIDGET2", "identifier":"Adidas", pids_list: ["a001", "a002"]});
Where:
-
experience_pageType:The PageType of the Page in which the experience widgets will be rendered.
List of PageTypes available:
- Home
- Product
- Category
- Cart
- Brand
- experience_widget: The widgetType of the rendered experience widget.
List of widgets available:
WIDGET 1
WIDGET 2
WIDGET 3 - pids_list: list of all the products which are loaded inside the recommendation widget
Search Impression
A Search Impression (also known as Product Impressions) event is generated after a shopper gets a list of products on the search results page. This event is also generated every time a shopper refines the results by facets, filters, scroll-down or pagination. The productId of the products listed in the PLP will be sent as a payload.
There are two ways you can integrate the functionality to track Search Impression events:
-
Custom HTML attributes
-
Custom APIs
Custom HTML attributes
To track every search impression, insert the following API code within the HTML tags on the product category pages on your site.
<script type="text/javascript">UnbxdAnalyticsConf=window.UnbxdAnalyticsConf ||{};UnbxdAnalyticsConf["query"]="nike";</script>
Where:
query: Specifies the search query
Dwell Time
A Dwelltime event is generated to indicate the time spent on the Product Details Page (PDP). This event is generated every 10 seconds and serves to indicate the amount of time a shopper remains on the page.
There are two ways you can integrate the functionality to track product clicks:
-
Custom HTML attributes
-
Custom APIs
Custom HTML attributes
To track the amount of time a shopper spends on a PDP, insert the following HTML on the product details page.
<script type = "text/javascript">UnbxdAnalyticsConf=window.UnbxdAnalyticsConf|| {};UnbxdAnalyticsConf['pid']=<pid>//if set will be treated page as PDP</script>
Where,
pid: The unique identifier of the product as defined in the feed
Custom APIs
To track the amount of time a shopper spends on a PDP, insert the following API code to the product category pages on your site.
Unbxd.track('dwellTime',{"pid":<pid>,"dwellTime":<dwellTime>})
Where:
- pid: The unique identifier of the product as defined in the feed
- dwellTime: The amount of time (in milliseconds) a shopper spends on a PDP
Facets
A Facet event tracks the guided navigation on the Product Listing Page. The event query will list the specific filters the shopper has selected to narrow down the results on the search results page.
You can integrate the functionality to track product clicks using custom APIs.
Custom APIs
To track the facets a shopper has chosen on the Search page, insert the following API code to the SRP on your site.
Unbxd.track('facets',{query:<query>,facets:<facets>})
To track the facets a shopper has chosen on the Category page, insert the following API code to the product category pages on your site.
Unbxd.track('facets',{page:<path>,page_type:<page_type>,facets:<facets>})
Where,
- <facets>: All currently applied facets (type json object)
- <page>: Unique identifier for the page passed in the category page API as parameter ‘p’
- <page_type>: It is used internally by Unbxd for tracking. Value should be set to “BOOLEAN”
- Did this answer your question?
On this Section
- To create a Query Rule
- To Edit a Query Rule
- Delete a Query Rule
- Campaign States
- Create Campaigns
- Edit Campaigns
- Preview Campaigns
- Duplicate Campaigns
- Delete Campaigns