Insights Tag - Server to server

To power dynamic re-ranking and our insights reports, we want to capture key e-commerce events on your platform, such as product views, clicks, add-to-carts, and purchases.

The Insights Tag is just a wrapper to our Analytics API. Every method exposed in the tag is also available as an API endpoint. This way you can also set up the tag on your back-end, without the need for any frontend changes.

Events

Click product (coming soon)

To measure how many times an item is clicked, send a itemClick event whenever a user clicks/taps an item.

PropertyValue / description
RequestIdThe unique id of the item
ItemIdThe id of the linked navigation request.
curl --request POST \
     --url https://navigator-analytics.tweakwise.com/api/itemclick \
     --header 'Instance-Key: INSTANCEKEY' \
     --header 'content-type: text/json' \
     --data '
{
  "RequestId": "d03c40f5-6894-4e4f-9cd8-95d4efe38eaa",
  "ItemId": "item123"
}
'

Purchase

The purchase event tracks the transaction of your customers. It is crucial for analyzing the overall performance of algorithm usage, builder, filter templates and more.

PropertyValue / description
ProductKeysArray of unique id's of the items in the transaction
ProfileKeyThe profile key identifying the visitor.
curl --request POST \
     --url https://navigator-analytics.tweakwise.com/api/purchase \
     --header 'Instance-Key: INSTANCEKEY' \
     --header 'content-type: text/json' \
     --data '
{
  "ProductKeys": [
    "3129",
    "6471"
  ],
  "ProfileKey": "tw.fg$ae12deH.8631552"
}
'

View product

To measure how many times item details are viewed, send a productView event whenever a user views an item’s details screen.

PropertyValue / description
ProductKeyThe unique id of the item
ProfileKeyThe profile key identifying the visitor.
curl --request POST \
     --url https://navigator-analytics.tweakwise.com/api/productview \
     --header 'Instance-Key: INSTANCEKEY' \
     --header 'content-type: text/json' \
     --data '
{
  "ProductKey": "3129",
  "ProfileKey": "tw.fg$ae12deH.8631552"
}
'

Search

To measure the amount of search queries, send a search event when a user enters a search term, including the term the user has entered.

PropertyValue / description
SearchTermThe search term the visitor used to search for products.
ProfileKeyThe profile key identifying the visitor.
curl --request POST \
     --url https://navigator-analytics.tweakwise.com/api/productview \
     --header 'Instance-Key: INSTANCEKEY' \
     --header 'content-type: text/json' \
     --data '
{
  "SearchTerm": "jeans",
  "ProfileKey": "tw.fg$ae12deH.8631552"
}
'