Analytics API
Introduction
Navigating the dynamic landscape of online commerce, whether you're steering a large enterprise or piloting a small-to-medium-sized online store, underscores the challenge of managing finite resources. As your business expands, the expectations of your shoppers evolve, seeking an increasingly intuitive and personalized retail experience.
In this context, the Analytics API emerges as a vital tool. It facilitates the tracking of visitor analytics and behavior, all while maintaining anonymity. This meticulous monitoring is pivotal for delivering not only accurate but also visitor-specific search and category page results. By gaining deeper insights into user interactions, businesses can tailor their strategies to meet the unique preferences of their customers, ultimately fostering a more engaging and responsive online environment. As businesses embrace the potential of the Analytics API, they are better positioned to navigate the complexities of the digital marketplace and cater to the diverse needs of their growing customer base.
Events
- Search Event: Triggered when a user visits the website and enters a search term, indicating an active interest in finding a specific product.
- PLP Event: Activated when a user engages with category navigation, providing insights into their preferences within product groupings.
- Autosuggest Event: Recorded when users click on suggested terms, offering valuable data on popular and relevant search queries.
- Filter Event: Captures user activity when applying filters on the Search Listing Page (SLP) or Product Listing Page (PLP), aiding in refining search results.
- Sort Event: Noted when a user applies sorting options on the SLP or PLP, revealing preferences for how products are displayed.
- PDP Event: Occurs when the user navigates to the Product Detail Page from either the SLP or PLP, signaling a deeper interest in a specific product.
- Cart Add Event: Triggered when a user adds a product to their shopping cart, a crucial step in the conversion process.
- Wishlist Event: Registered when a user adds a product to their wishlist from the SLP or PLP, offering insights into desired items for potential future purchases.
- Order Event: Logged when a user successfully creates an order, marking the culmination of the customer journey and providing essential data for transaction analysis.
API Integration
This approach involves incorporating API references for each specific event that you wish to track.
For this method, the calls need to be structured as HTTP POST requests to the designated URL.
https://api.*****.ai/indexer-api/clickstream/publish
There are some attributes which we track for all the events:
Attribute Name | Data Type | Type | Description |
---|---|---|---|
event_time | String | Required | The timestamp indicating when the event occurred, specified in the ISO 8601 format, including date and time with timezone information. |
session_id | String | Required | A unique identifier for the session, linking multiple user interactions during a specific period. |
session_user_id | String | Optional | An identifier associated with the user's session, maintaining consistency across multiple interactions during the same session. |
user_id | String | Optional | A unique identifier assigned to the user, facilitating the tracking of individual user activities and preferences. |
device | String | Optional | Describes the type or model of the device used by the user during the event, such as a computer, tablet, or smartphone. |
location | String | Optional | Specifies the geographical location or region associated with the event, providing context regarding where the user interaction occurred. |
metadata | Object | Optional | Additional information or contextual data related to the event, providing supplementary details for analysis. |
channel | String | Optional | Indicates the channel through which the event was initiated, offering insights into the platform or source where the user engaged with the system. |
ab_flag | String | Optional | A flag or indicator associated with A/B testing, signifying the experimental condition or group to which the user belongs. |
event_type | String | Required | Specifies the type of event recorded. |
Search Event
A search event refers to a user-initiated action within an online platform, typically a website or application, where the individual enters a specific query or keyword into the search functionality with the intent of finding relevant information or products. This event is crucial for tracking user engagement and preferences, providing insights into what users are actively seeking and allowing businesses to optimize their search and discovery experiences accordingly.
This event not only involves capturing the user's search query but also includes tracking impressions, indicating instances where search results or suggestions are displayed to the user.
Here is the sample payload
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"event_type": "SearchEvent",
"search_term": "string",
"search_result_count": 0,
"impressions": [
{
"product_id": "string",
"rank": 0,
"instock": true
}
]
}
Attribute Name | Data Type | Type | Description |
---|---|---|---|
search_term | String | Required | The specific query or keyword entered by the user during the search event, revealing their intent or area of interest. |
search_result_count | Int | Required | The count of search results generated in response to the user's query. |
impressions | List | Optional | An array containing information about products displayed as a result of the search, including product_id, rank (position in the search results), and instock status (availability) |
Autosuggest Event
An autosuggest event refers to a user-initiated action in an online platform, such as a website or application, where the individual clicks on suggested items after entering a specific prefix or term in the search bar. This interaction aims to refine search queries, providing users with more targeted and personalized suggestions. Autosuggest events are crucial for understanding user preferences, optimizing the search experience, and tailoring suggestions based on individual behavior.
The event includes tracking the clicked term and its position in the suggestion list, offering insights for improved suggestion algorithms.
Here is the sample payload
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"event_type": "AutoSuggestEvent",
"search_term": "string",
"autosuggest_prefix": "string",
"autosuggest_position": 0
}
Attribute Name | Data Type | Type | Description |
---|---|---|---|
search_term | String | Required | The original term or suggestion clicked by the user in the search bar. |
autosuggest_prefix | String | Required | The term or prefix typed by the user in the search bar while clicking on a suggestion. |
autosuggest_position | Int | Required | The numerical order or rank of the clicked suggestion in the autosuggest list. |
Filter Event
The Filter Event in a search context represents a user-initiated action where an individual applies a filter on either the Search Listing Page (SLP) or Product Listing Page (PLP). This event captures the user's intent to refine search results by specifying certain criteria, such as price range, brand, or other relevant attributes. The filter_event is crucial for understanding user preferences and optimizing the search experience by providing more tailored and relevant results based on the applied filters.
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"search_term": "string",
"page_id": "string",
"page_params": [
{
"field": "string",
"values": [
"string"
]
}
],
"event_type": "FilterEvent",
"filters": [
{
"name": "string",
"field": "string",
"values": [
"string"
]
}
]
}
Attribute Name | Data Type | Type | Description |
---|---|---|---|
page_id | String | Optional | The identifier for the page where the Filter Event occurred, specifying the context or section of the platform. |
page_params | List | Optional | An array containing additional parameters or attributes related to the page where the Filter Event occurred. Each object within the array includes a "field" and an array of corresponding "values." |
filters | List | Required | An array containing information about the applied filters during the event. Each object within the array includes the "name" of the filter, the "field" associated with the filter, and an array of corresponding "values" indicating the selected filter values. |
Sort Event
The Sort Event in a search context signifies a user-initiated action when an individual applies a specific sorting criterion on either the Search Listing Page (SLP) or Product Listing Page (PLP). This event captures the user's preference for organizing search results based on parameters like price, relevance, or popularity. The sort_event is essential for understanding user priorities and optimizing the search experience by presenting results in an order that aligns with the user's preferences, enhancing overall usability and satisfaction.
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"search_term": "string",
"page_id": "string",
"page_params": [
{
"field": "string",
"values": [
"string"
]
}
],
"event_type": "SortEvent",
"sort": "string"
}
PDP Event
The PDP (Product Detail Page) Event denotes a user-initiated action when an individual navigates from either the Search Listing Page (SLP) or Product Listing Page (PLP) to view the detailed information of a specific product. This event captures the user's interest in a particular item, signaling a deeper level of engagement. The PDP event is instrumental in tracking user interactions and preferences, providing valuable insights into the products that attract user attention and facilitating optimization of the overall product presentation and detail page experience.
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"search_term": "string",
"page_id": "string",
"page_params": [
{
"field": "string",
"values": [
"string"
]
}
],
"event_type": "PDPEvent",
"product_id": "string",
"click_position": 0
}
Attribute Name | Data Type | Type | Description |
---|---|---|---|
product_id | String | Required | The unique identifier of the product for which the user navigated to the Product Detail Page (PDP). |
click_position | Int | Optional | he numerical order or rank indicating the user's click position when navigating to the PDP from the page, for example, 0 for the first click. |
Wishlist Event
a Wishlist Event signifies a user-initiated action where an individual adds a product to their wishlist. This event captures the user's intent to bookmark or express interest in a particular item for potential future reference. Analyzing Wishlist Events provides valuable insights into user preferences, aiding platforms in tailoring personalized experiences and refining their offerings.
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"search_term": "string",
"event_type": "WishListEvent",
"product_id": "string"
}
Card Add Event
A Cart Add Event represents a user-initiated action where an individual adds a product to their shopping cart. This event captures the user's intent to include a specific item for eventual purchase.
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"search_term": "string",
"event_type": "CartEvent",
"product_id": "string"
}
Order Event
An Order Event signifies the culmination of a user's journey, reflecting the successful completion of a purchase. This event is triggered when an individual finalizes their selection, proceeds to checkout, and confirms the purchase of one or more items.
{
"event_time": "2023-07-24T10:28:31.302Z",
"session_id": "string",
"session_user_id": "string",
"user_id": "string",
"device": "string",
"location": "string",
"channel": "string",
"metadata": {},
"ab_flag": "string",
"search_term": "string",
"event_type": "OrderEvent",
"sale_info": [
{
"qty": 0,
"price": 0,
"product_id": "string"
}
]
}
Updated 10 months ago