Previously, client browser calls to the Recommendation service directly with data were created on the server side, and the cuid/sessionid were included in the data. This created two problems when the rendered page got cached:
The client-side API was rewritten to be more full-featured, like the server side APIs: creating different types of tracking requests and populating them with data. Instead of calling to Recommendation directly, JS APIs call to Proxy. The Proxy is an asynchronous webapi controller that handles tracking request from Js APIs and forwards requests to the Recommendation service.
You can use JS Tracking APIs and Server Tracking APIs in parallel. On the client side, you can use JS TrackingDataFactory to create tracking data and epiRecommendations to send tracking requests to the Proxy. On the server side, you can use Tracking APIs, or TrackingAttribute for short.
TrackingMode has been obsoleted. As mentioned above, Js Tracking APIs and Server tracking APIs are independent and work in parallel.
epiRecommendations now support setting scope when sending tracking data.
track(trackingData, scope, onSuccess, callbackOptions)
The JS TrackingDataFactory class has been added to create js tracking data, which is sent to the Proxy. The following methods are available to create js TrackingData.
|Create Home tracking data||
|Create Product tracking data||
|Create SearchResult tracking data||
|Create Checkout tracking data||
|Create Basket tracking data||
|Create Order tracking data||
|Create Brand tracking data||
|Create Category tracking data||
|Create Attribute tracking data||
|Create Wishlist tracking data||
The Proxy has only one endpoint to handle tracking requests sent from the client.
Endpoint url: episerverapi/commercetracking/track
Last updated: Oct 19, 2018