Skip to content

Server-side tracking

Hello Retail supports both client-side and server-side tracking for View, Click, Conversion & Cart-tracking. This document outlines the endpoints and requirements for implementing server-side tracking.

Endpoints

Required Parameters

For all tracking endpoints, include the following parameters:

  • trackingUserId: This ID can be pulled from this API endpoint. We advise storing it in a session or cookie to avoid making unnecessary requests.
  • websiteUuid: This is static for each website and can be added to your configuration file.

These parameters must be included in all endpoints to associate the tracked data with the correct website and visitor.

View Tracking

To perform view tracking, call the endpoint described here.

Click Tracking

To set up click tracking, use the endpoint described here.

To support buy button tracking, use beacons to send the request on click. This is to prevent the call from being canceled when navigating to the URL.

This can be done by adding the following JavaScript code to the click events on the product tiles:

navigator.sendBeacon("https://core.helloretail.com/serve/collect/click", {
    "trackingUserId": "{the tracking user id}",
    "websiteUuid": "{your website UUID}",
    "source": "{the source}"
});

The source parameter is used for attribution and can be used to track which recommendation box was clicked, as well as attribution through the search solution.

When retrieving products from either our recommendations, search, or pages endpoints, the URL for the product will contain the source fragment. The aw_source ID is used for click tracking.

Cart Tracking

To set up cart tracking, use the endpoint described here. When the cart updates, send the whole cart each time to clear the existing data in the cart. If the customer clears the cart, send a request without any products to clear the cart on our end.

Conversion Tracking

To perform conversion tracking, use the endpoint described here.