Tracking API (REST)
This page describes how to add SearchStax Site Search solution’s Analytics Events to your search page. The Tracking API (Javascript) page describes how you can use a helper Javascript library to push Analytics events. This document describes how the same events can be pushed using just a REST API.
Contents:
- Analytics URL, Key and the REST Endpoint
- Session Helper Function
- Calling the Analytics REST Endpoint
- Search Events vs Related Search Events
- Track Searches and Impressions
- Track Smart Answers
- Track Related Searches and Impressions
- Track Search Clicks
- Track Smart Answer Clicks
- Track Related Search Clicks
- Track Search Satisfaction
Analytics URL, Key and the REST Endpoint
The Analytics Tracking URL and Analytics Tracking Key for your App are available within your Site Search > App Settings > Data Management > All APIs > Analytics tab as shown below:

The Analytics REST endpoint is <Analytics URL>/api/v2/track/
.
Example: https://analytics-us.searchstax.com/api/v2/track/
Events can be pushed to this endpoint as described in the sections below.
Session Helper Function
Each type of event has its own set of required properties, which are detailed below. Session is a common property across all events:
Parameter | Description | Example |
---|---|---|
session: required string |
The ID of the web session or mobile application session. If omitted, some analytics features cannot be fully reported. | ‘qqMKt4fxhcud0T5c3UJ5spgug’ |
Session can be obtained using the following helper function:
getSession : function(name){
var name = 'searchcookie';
var session = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
return session[2];
}
Calling the Analytics REST Endpoint (/track API)
To call the REST API and insert the event, the event objects should be encoded to Base64 and passed as the data
. For example, for the above request, you can use online base64 encoders such as https://www.base64encode.org/ to encode the object and then call the API endpoint as follows:
curl -vL "https://analytics-us.searchstax.com/api/v2/track/?data=ewogICJldmVudCI6ICJfc2VhcmNoIiwKICAicHJvcGVydGllcyI6IHsKICAgICJrZXkiOiAiaW1ETXJzNTZhVGFESmM2amloRGVqVWtEWllqM0dtOHJpSkhsUjBWMVM1OCIsCiAgICAicXVlcnkiOiAic2l0ZWNvcmUiLAogICAgInNob3duSGl0cyI6IDMsCiAgICAidG90YWxIaXRzIjogMTIsCiAgICAicGFnZU5vIjogMSwKICAgICJsYXRlbmN5IjogNiwKICAgICJzZXNzaW9uIjogInI2aXZweGtkM2UyOTRrSjI5OVYwdFZiMXEiLAogICAgImltcHJlc3Npb25zIjogWwogICAgICB7CiAgICAgICAgImNEb2NJZCI6ICJodHRwczovL3d3dy5zZWFyY2hzdGF4LmNvbS9zb2x1dGlvbnMvc2l0ZWNvcmUtc29sci8iLAogICAgICAgICJjRG9jVGl0bGUiOiAiTWFuYWdlZCBTb2xyIFNlcnZpY2UgZm9yIFNpdGVjb3JlIHwgU2VhcmNoU3RheCIsCiAgICAgICAgInBvc2l0aW9uIjogMQogICAgICB9LAogICAgICB7CiAgICAgICAgImNEb2NJZCI6ICJodHRwczovL3d3dy5zZWFyY2hzdGF4LmNvbS9ibG9nL3NpdGUtc2VhcmNoLWZvci1zaXRlY29yZS12aWRlby8iLAogICAgICAgICJjRG9jVGl0bGUiOiAiU2l0ZSBTZWFyY2ggZm9yIFNpdGVjb3JlIC0gVmlkZW8gfCBUaGUgU2VhcmNoIEV4cGVyaWVuY2UgQmxvZyIsCiAgICAgICAgInBvc2l0aW9uIjogMgogICAgICB9LAogICAgICB7CiAgICAgICAgImNEb2NJZCI6ICJodHRwczovL3d3dy5zZWFyY2hzdGF4LmNvbS9zaXRlY29yZS1henVyZS10by1zb2xyLW1pZ3JhdGlvbi8iLAogICAgICAgICJjRG9jVGl0bGUiOiAiTWlncmF0ZSBBenVyZSBTZWFyY2ggdG8gU29sciBmb3IgU2l0ZWNvcmUgfCBTZWFyY2hTdGF4IiwKICAgICAgICAicG9zaXRpb24iOiAzCiAgICAgIH0KICAgIF0sCiAgICAiX3ZpZCI6ICJkN2NjMzcyYS0yYmU2LWVlMWUtMjZlOC0wZjkwM2ZhMzZlNjciCiAgfQp9"
The above method returns an HTTP status code of 201/204 if the event was successfully added.
If the data is large, you should use POST instead of GET API.
If the data contains special characters, you should make sure it is URL encoded (Can test on https://www.urlencoder.org/)
DATA = urlEncode(base64encode(searchObj))
curl -v "https://analytics-us.searchstax.com/api/v2/track/?data=$DATA"
Search Events vs Related Search Events
The “search” and “related-search” events are intended to be used in the following fashion:
- Your search page sends a query to the search API. The search results are returned. A track event fires to track the impressions from the search results.
- If using the related searches features, your search page sends a request to the related searches API to get related searches for the query. The related searches are returned. A trackRelatedSearch event fires to track the related searches that were returned
- If the user clicks on a document, a trackClick event fires to track which document was clicked on.
- If the user clicks on a related search, a trackRelatedSearchClick event fires to track which related search was clicked on.
Track Searches and Impressions
To track searches, create a data object as below, which specifies the event type as _search
.
var searchObj = {
"event": "_search",
"properties": {
"key": "imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58",
"query": "sitecore",
"shownHits": 3,
"totalHits": 12,
"pageNo": 1,
"latency": 6,
"session": "r6ivpxkd3e294kJ299V0tVb1q",
"impressions": [
{
"cDocId": "https://www.searchstax.com/solutions/sitecore-solr/",
"cDocTitle": "Managed Solr Service for Sitecore | SearchStax",
"position": 1
},
{
"cDocId": "https://www.searchstax.com/blog/site-search-for-sitecore-video/",
"cDocTitle": "SearchStudio for Sitecore - Video | The Search Experience Blog",
"position": 2
},
{
"cDocId": "https://www.searchstax.com/solutions/sitecore-azure-to-solr-migration/",
"cDocTitle": "Migrate Azure Search to Solr for Sitecore | SearchStax",
"position": 3
}
],
"_vid": "d7cc372a-2be6-ee1e-26e8-0f903fa36e67",
"language": "en",
"model": "CorpsiteModel"
}
}
Parameter | Description | Example |
---|---|---|
event: required string |
Type of user action on the search page. | ‘_search’ |
key: required string |
Unique Analytics API Key | ‘IeDTTDD1ubJdfPMmu7MMxxVjUMdw6vo52BjPixxqwcQ’ |
user: optional string |
A token identifying the webpage user. This datum is stored but is not currently used. | ‘smith123’ |
session: required string |
The ID of the web session or mobile application session. | ‘qqMKt4fxhcud0T5c3UJ5spgug’ |
query: required string |
The query string from your search page, or q from the response document. | ‘sitecore plugin’ |
shownHits: optional number |
The number of hits shown in the response document. | 10 |
totalHits: optional number |
The number of hits in the index, from the response document.
Note: To track searches that returned no results, set totalHits to 0. |
1890 |
latency: optional number |
The number of milliseconds to execute a search. You define the semantics. (One possibility is to use Qtime from the response document). Without this value, Analytics will not calculate average latency. | 150 |
pageNo: optional number |
The page number of the displayed results, from the response document. | 1 |
impressions: optional array |
An array of dictionaries, each describing a search result “impression.” It lets the Analytics App track the documents that were displayed to the user as search results, whether the user clicked on them or not |
[ where cDocId is the unique ID of the document and cDocTitle is the title that is displayed for the search result.The position numbers should start with 1 |
_vid: required string |
Unique Identifier for the visitor. | d7cc372a-2be6-ee1e-26e8-0f903fa36e67 |
language: optional string |
A two-letter language code. Defaults to the default language. | “en”, “fr”, or “es” |
model: optional string |
A Profile name. | “CorpsiteModel” |
Track Smart Answers
This event captures when a user asks a question and receives an AI-generated Smart Answer.
To track Smart Answers, create a data object as below, which specifies the event type as _questionanswer
.
var searchObj = {
"event": "_questionanswer",
"properties": {
"session": "7VQaTMRraYbTWtJQpXZdeYmZY",
"key": "imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58",
"question": "what versions of solr does searchstax support",
"answer": "SearchStax supports a variety of Apache Solr versions for its Managed Search service. As of the latest information, the supported versions include:<br><br>- **9.8.1** (Recommended)<br>- **9.8.0** (Recommended)<br>- **9.7.0**<br>- **9.5.0**<br>- **9.1.1**<br>- **8.11.4** (Recommended)<br>- **8.11.2**<br>- **8.11.1**<br>- **8.8.2**<br>- **8.8.1**<br>- **8.6.3**<br>- **8.4.0**<br>- **8.3.1**<br>- **8.2.0**<br>- **8.1.1**<br>- **7.7.2** (Recommended)<br>- **7.6.0**<br>- **7.5.0**<br>- **7.3.1**<br>- **7.2.1**<br>- **6.6.6** (Recommended)<br>- **6.6.4**<br>- **6.6.3**<br>- **6.6.2**<br>- **6.6.1**<br>- **6.6.0**<br>- **6.4.2**<br>- **6.2.0**<br><br>You can find more detailed information on the versions supported by SearchStax [here](https://www.searchstax.com/docs/searchstax-cloud-solr-versions/).",
"language": "en",
"model": "CorpsiteModel",
"is_question": "true",
"_vid": "707c1348-af8f-25aa-eca3-53874bb29188",
}
}
Parameter | Description | Example |
---|---|---|
event: required string |
Type of user action on the search page. | ‘_questionanswer’ |
session: required string |
The ID of the web session or mobile application session. | ‘qqMKt4fxhcud0T5c3UJ5spgug’ |
key: required string |
Unique Analytics API Key | ‘IeDTTDD1ubJdfPMmu7MMxxVjUMdw6vo52BjPixxqwcQ’ |
question: required string |
The user’s original query. | “what versions of solr does searchstax support” |
answer: required string |
AI-generated response with citations and formatting. | “SearchStax supports a variety of Apache Solr versions for its Managed Search service. As of the latest information, the supported versions include:<br><br>- **9.8.1** (Recommended)<br>- **9.8.0** (Recommended)<br>- **9.7.0**<br>- **9.5.0**<br>- **9.1.1**<br>- **8.11.4** (Recommended)<br>- **8.11.2**<br>- **8.11.1**<br>- **8.8.2**<br>- **8.8.1**<br>- **8.6.3**<br>- **8.4.0**<br>- **8.3.1**<br>- **8.2.0**<br>- **8.1.1**<br>- **7.7.2** (Recommended)<br>- **7.6.0**<br>- **7.5.0**<br>- **7.3.1**<br>- **7.2.1**<br>- **6.6.6** (Recommended)<br>- **6.6.4**<br>- **6.6.3**<br>- **6.6.2**<br>- **6.6.1**<br>- **6.6.0**<br>- **6.4.2**<br>- **6.2.0**<br><br>You can find more detailed information on the versions supported by SearchStax [here](https://www.searchstax.com/docs/searchstax-cloud-solr-versions/).” |
is_question: required boolean |
Boolean flag indicating this is a question-type query (as returned by the Smart Answer API I_AM_A_QUESTION response) | “true” |
_vid: required string |
Unique Identifier for the visitor. | d7cc372a-2be6-ee1e-26e8-0f903fa36e67 |
language: optional string |
A two-letter language code. Defaults to the default language. | “en”, “fr”, or “es” |
model: optional string |
A Profile name. | “CorpsiteModel” |
Track Related Searches and Impressions
To track related searches, create a data object as below, which specifies the event type as _relatedsearch
.
var relatedSearchObj = {
"event":"_relatedsearch",
"properties":{
"session":"JKaqFFK088vyrTkIBwBeWDyhQ",
"key":"IeDTTDD1ubJdfPMmu7MMxxVjUMdw6vo52BjPixxqwcQ",
"query":"solr",
"shownHits":2,
"totalHits": 12,
"pageNo": 1,
"impressions":[
{"relatedSearch":"managed solr",
"position":1},
{"relatedSearch":"solr 7",
"position":2}
],
"_vid":"d7cc372a-2be6-ee1e-26e8-0f903fa36e67",
"language": "en",
"model": "CorpsiteModel"
}}
Parameter | Description | Example |
---|---|---|
event: required string |
Type of user action on the search page. | ‘_relatedsearch’ |
key: required string |
Unique Analytics API Key | ‘4Qp1Sv9MnALbAGbixW9ZaWrHxpbfwm6i’ |
user: optional string |
A token identifying the webpage user. This datum is stored but is not currently used. | ‘smith123’ |
session: required string |
The ID of the web session or mobile application session. | ‘XDJFNS355FGDFVVDFG’ |
query: required string |
The query string from your search page, or q from the response document. | ‘sitecore plugin’ |
shownHits: optional number |
The number of hits shown in the response document. | 10 |
totalHits: optional number |
The number of hits in the index, from the response document.
Note: To track searches that returned no results, set totalHits to 0. |
1890 |
latency: optional number |
The number of milliseconds to execute a search. You define the semantics. (One possibility is to use Qtime from the response document). Without this value, Analytics will not calculate average latency. | 150 |
impressions: optional array |
An array of dictionaries, each describing a related search “impression.” It lets the Analytics App track the related searches that were displayed to the user as search results, whether the user clicked on them or not |
|
_vid: required string |
Unique Identifier for the visitor. | d7cc372a-2be6-ee1e-26e8-0f903fa36e67 |
language: optional string |
A two-letter language code. Defaults to the default language. | “en”, “fr”, or “es” |
model: optional string |
A Profile name. | “CorpsiteModel” |
Track Search Clicks
To start generating data around click-through events, search quality and relevance, have /track
send _searchclick
event to the Analytics App.
var searchClickObj = {
"event": "_searchclick",
"properties": {
"key": "imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58",
"query": "sitecore",
"shownHits": 12,
"totalHits": 143,
"pageNo": 1,
"latency": 6,
"session": "jtVM0lqSBMEfmBDYBHaUjodIL",
"cDocId": "https://www.searchstax.com/blog/site-search-for-sitecore-video/",
"cDocTitle": "SearchStudio for Sitecore - Video | The Search Experience Blog",
"position": 2,
"_vid": "d7cc372a-2be6-ee1e-26e8-0f903fa36e67",
"language": "en",
"model": "CorpSiteModel"
}
}
Parameter | Description | Example |
---|---|---|
event: required string |
Type of user action on search page. | ‘_searchclick’ |
key: required string |
Unique Analytics API Key | ‘IeDTTDD1ubJdfPMmu7MMxxVjUMdw6vo52BjPixxqwcQ’ |
user: optional string |
A token identifying the webpage user. This datum is stored but is not currently used. | ‘smith123’ |
session: required string |
The ID of the web session or mobile application session. | ‘qqMKt4fxhcud0T5c3UJ5spgug’ |
query: required string |
The query string from your search page, or q from the response document. | ‘sitecore’ |
cDocId: required string |
The document ID from the response document. | ‘https://www.searchstax.com/blog/site-search-for-sitecore-video/’ |
cDocTitle required string |
The document title from the response document. Note: In some applications, the document title may change. Analytics can be calculated as long as cDocID remains constant. | ‘SearchStax Studio for Sitecore – Video | The Search Experience Blog’ |
position: required number |
Absolute position of the document in the full list of results. If we’re showing ten items per page, the first result on the 5th page is position in position 41. First item on the first page has position as 1 | 2 |
pageNo: optional number |
The page number of the displayed results, from the response document. | 1 |
pageUrl: optional string |
The URL of the page that is sending the tracking request | ‘https://searchstudio.searchstax.com/search’ |
shownHits: optional number |
The number of hits shown in the response document. | 10 |
totalHits: optional number |
The number of hits in the index, from the response document. | 1890 |
_vid: required string |
Unique Identifier for the visitor. | d7cc372a-2be6-ee1e-26e8-0f903fa36e67 |
language: optional string |
A two-letter language code. Defaults to the default language. | “en”, “fr”, or “es” |
model: optional string |
A Profile name. | “CorpsiteModel” |
To call the REST API and insert the event, the event object should be encoded to Base64 and passed as the data
, just like for the _search event
DATA = urlEncode(base64encode(searchClickObj))
curl -v "https://analytics-us.searchstax.com/api/v2/track/?data=$DATA"
The above method returns an HTTP status code of 201/204 if the event was successfully added.
Track Smart Answer Clicks
Captures when a user clicks on source links within AI-generated Smart Answers.
To start generating data around click-through events within Smart Answers, send _answersourceclick
events to the Analytics App.
var searchClickObj = {
"event": "_answersourceclick",
"properties": {
"key": "imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58",
"question": "what versions of solr does searchstax support",
"session": "7VQaTMRraYbTWtJQpXZdeYmZY",
"href": "https://www.searchstax.com/docs/searchstax-cloud-solr-versions/",
"language": "en",
"model": "CorpsiteModel",
"answer": "SearchStax supports a variety of Apache Solr versions for its Managed Search service. As of the latest information, the supported versions include:<br><br>- **9.8.1** (Recommended)<br>- **9.8.0** (Recommended)<br>- **9.7.0**<br>- **9.5.0**<br>- **9.1.1**<br>- **8.11.4** (Recommended)<br>- **8.11.2**<br>- **8.11.1**<br>- **8.8.2**<br>- **8.8.1**<br>- **8.6.3**<br>- **8.4.0**<br>- **8.3.1**<br>- **8.2.0**<br>- **8.1.1**<br>- **7.7.2** (Recommended)<br>- **7.6.0**<br>- **7.5.0**<br>- **7.3.1**<br>- **7.2.1**<br>- **6.6.6** (Recommended)<br>- **6.6.4**<br>- **6.6.3**<br>- **6.6.2**<br>- **6.6.1**<br>- **6.6.0**<br>- **6.4.2**<br>- **6.2.0**<br><br>You can find more detailed information on the versions supported by SearchStax [here](https://www.searchstax.com/docs/searchstax-cloud-solr-versions/).",
"_vid": "707c1348-af8f-25aa-eca3-53874bb29188",
}
}
Parameter | Description | Example |
---|---|---|
event: required string |
Type of user action on the search page. | ‘_answersourceclick’ |
session: required string |
The ID of the web session or mobile application session. | ‘qqMKt4fxhcud0T5c3UJ5spgug’ |
key: required string |
Unique Analytics API Key | ‘IeDTTDD1ubJdfPMmu7MMxxVjUMdw6vo52BjPixxqwcQ’ |
href: required string |
URL of the clicked source link. | “https://www.searchstax.com/docs/searchstax-cloud-solr-versions/” |
question: required string |
The user’s original query. | “what versions of solr does searchstax support” |
answer: required string |
AI-generated response with citations and formatting. | “SearchStax supports a variety of Apache Solr versions for its Managed Search service. As of the latest information, the supported versions include:<br><br>- **9.8.1** (Recommended)<br>- **9.8.0** (Recommended)<br>- **9.7.0**<br>- **9.5.0**<br>- **9.1.1**<br>- **8.11.4** (Recommended)<br>- **8.11.2**<br>- **8.11.1**<br>- **8.8.2**<br>- **8.8.1**<br>- **8.6.3**<br>- **8.4.0**<br>- **8.3.1**<br>- **8.2.0**<br>- **8.1.1**<br>- **7.7.2** (Recommended)<br>- **7.6.0**<br>- **7.5.0**<br>- **7.3.1**<br>- **7.2.1**<br>- **6.6.6** (Recommended)<br>- **6.6.4**<br>- **6.6.3**<br>- **6.6.2**<br>- **6.6.1**<br>- **6.6.0**<br>- **6.4.2**<br>- **6.2.0**<br><br>You can find more detailed information on the versions supported by SearchStax [here](https://www.searchstax.com/docs/searchstax-cloud-solr-versions/).” |
_vid: required string |
Unique Identifier for the visitor. | d7cc372a-2be6-ee1e-26e8-0f903fa36e67 |
language: optional string |
A two-letter language code. Defaults to the default language. | “en”, “fr”, or “es” |
model: optional string |
A Profile name. | “CorpsiteModel” |
Track Related Search Clicks
To start generating data around click-through events, search quality and relevance, have /track
send _relatedsearchclick
event to the Analytics App.
{"event":"_relatedsearchclick","properties":{"session":"JKaqFFK088vyrTkIBwBeWDyhQ","key":"tACKiVHqhd22wS3AEE3EYmKwbriokhs04Yja6uoAaXk","query":"solr","relatedSearch":"managed solr","pageNo":1,"shownHits":1,"totalHits":1,"_vid":"0b7fef5a-2deb-2e4e-15d3-5c8e4a19d58c","tt":1645231821464,"pageUrl":"https%3A%2F%2Fsearchstudio.searchstax.co%2Fapps%2Fyivdt5dND9n3WqjZOD5ZKIgbvzdz5lBH7gsVPRg6sAY%2Fsearch.html%3FsearchStudioQuery%3Dsolr%26style%3Dfalse%26facets%3D%26sort%3D%26start%3D0"}}
var searchClickObj = {
"event": "_relatedsearchclick",
"properties": {
"key": "imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58",
"query": "sitecore",
"shownHits": 12,
"totalHits": 143,
"pageNo": 1,
"latency": 6,
"session": "jtVM0lqSBMEfmBDYBHaUjodIL",
"relatedSearch": "Sitecore 7",
"position": 2,
"_vid": "d7cc372a-2be6-ee1e-26e8-0f903fa36e67",
"language": "en",
"model": "CorpSiteModel"
}
}
Parameter | Description | Example |
---|---|---|
event: required string |
Type of user action on search page. | ‘_relatedsearchclick’ |
key: required string |
Unique Analytics API Key | ‘4Qp1Sv9MnALbAGbixW9ZaWrHxpbfwm6i’ |
user: optional string |
A token identifying the webpage user. This datum is stored but is not currently used. | ‘smith123’ |
session: required string |
The ID of the web session or mobile application session. | ‘XDJFNS355FGDFVVDFG’ |
query: required string |
The query string from your search page, or q from the response document. | ‘sitecore plugin’ |
position: required number |
Absolute position of the related search in the full list of results. If we’re showing ten related searches per page, the first related search on the 5th page is position in position 41. First related search on the first page has position as 1 | 41 |
relatedSearch: required string |
The related search term that was clicked on. | ‘sitecore 7’ |
pageNo: optional number |
The page number of the displayed results, from the response document. | 1 |
pageUrl: optional string |
The URL of the page that is sending the tracking request | ‘https://searchstudio.searchstax.com/search’ |
shownHits: optional number |
The number of hits shown in the response document. | 10 |
totalHits: optional number |
The number of hits in the index, from the response document. | 1890 |
_vid: required string |
Unique Identifier for the visitor. | d7cc372a-2be6-ee1e-26e8-0f903fa36e67 |
language: optional string |
A two-letter language code. Defaults to the default language. | “en”, “fr”, or “es” |
model: optional string |
A Profile name. | “CorpsiteModel” |
To call the REST API and insert the event, the event object should be encoded to Base64 and passed as the data
, just like for the _relatedsearch
event
DATA = urlEncode(base64encode(searchClickObj))
curl -v "https://analytics-us.searchstax.com/api/v2/track/?data=$DATA"
The above method returns an HTTP status code of 201/204 if the event was successfully added.
Track Search Satisfaction
SearchStax provides the ability to collect qualitative feedback about the search experience using the event _searchSatisfaction
as shown below:
var searchSatisfactionObj = {
"event": "_searchSatisfaction",
"properties": {
"key": "imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58",
"email": "user1@searchstax.com",
"score": 10,
"comments": "Very good search experience",
"_vid": "d7cc372a-2be6-ee1e-26e8-0f903fa36e67",
"model": "CorpSiteModel"
}
}
Parameter | Description | Example |
---|---|---|
key: required string |
Unique Analytics API Key. | ‘imDMrs56aTaDJc6jihDejUkDZYj3Gm8riJHlR0V1S58’ |
session: required string |
The ID of the web session or mobile application session. | ‘qqMKt4fxhcud0T5c3UJ5spgug’ |
email: optional string |
Email ID of the user submitting the feedback | ‘user123@searchstax.com’ |
comments: optional string |
Feedback about the search experience as a comment | ‘Very good search experience’ |
score: required string |
0-10 score, rating the search experience | 10 |
_vid: required string |
Unique Identifier for the visitor | “d7cc372a-2be6-ee1e-26e8-0f903fa36e67” |
model: optional string |
A Profile name. | “CorpsiteModel” |
To call the REST API and insert the event, the event object should be encoded to Base64 and passed as the data
, just like for the _search event
DATA = urlEncode(base64encode(searchSatisfactionObj))
curl -v "https://analytics-us.searchstax.com/api/v2/track/?data=$DATA"
The above method returns an HTTP status code of 201/204 if the event was successfully added.
Questions?
Do not hesitate to contact the SearchStax Support Desk.