(GET) Push Click Stats

This is an endpoint where you can send your analytics data to our server. If you want to see your metrics , like number of clicks, CTR, etc, to be displayed in our dashboard, you have to send the click data to this endpoint. When user clicks on one of the search result, you have to send both the session ID and the search ID.

GET#

https://api.altoshift.com/statsendpoint/stats

Header#

FieldTypeDescription
x-forwarded-forStringIP of the user

Request Header Example#

{
"x-forwarded-for": "125.160.114.239"
}

Request Body#

FieldTypeDescription
eventStringEvent's name
method optionalStringSearch method (strict, fuzzy, or soft)
url optionalStringProduct url
searchIdStringGenerated unique id of the search (every search action must have an unique id eventhough the user is the same)
searchQueryStringSearch keyword that typed by the user
searchCounter optionalStringNumber of search that user already did
sessionIdStringSession id of the user
tokenStringToken of the engine (token from the search layer)
itemId optionalStringItem id that sent by our search result
productIdStringUnique id of the products (product id from your site)
titleStringThe name/title of product
timeZoneStringTimezone of the user

Param Example#

/statsendpoint/stats?event=click&method=strict&url=https://www.test.com/en/tplink-adapter-300mbps-tl-wn8200nd-tl-wn8200ndmd.html
&searchCounter=1&searchId=77dda021cf7329e20a33fa892d6cea54&searchQuery=hoya&sessionId=eaaezz9k7-248153346jrglw123
&timeZone=Asia/Jakarta&token=5cd3f3042cd48000372c64fd-1557394180073-88706995
&itemId=5cd12285aecc14001c635614-5cd3f3042cd48000372c64fd-58938&productId=58938&title=LINK - WIRELESS ROUTER TL-WN8200ND_MD

Success 200#

FieldTypeDescription
successBooleanRequest was successful

Success Response Example#

{
"success": true
}