After creating the required E-Commerce parameters, enable the Recommendation Tracking extension and register the elements on your website that represent recommendation widgets.
1) Activate the extension
wtSmart.extension.recommendation_tracking.activate();Optional methods:
wtSmart.extension.recommendation_tracking.deactivate();
wtSmart.extension.recommendation_tracking.isActivated();2) Configure the extension
Use .config() to define how many recommendation events should be sent and whether a cookie is used to store widget context for attribution.
wtSmart.extension.recommendation_tracking.config({
maxSendProducts: {
session: 10000,
page: 1000
},
maxCookieSize: 4000
});Options
Option | Type | Default | Description |
|---|---|---|---|
maxSendProducts.session | number | 10000 | Max. number of recommendation events per session (-1 = unlimited) |
maxSendProducts.page | number | 1000 | Max. number of recommendation events per page (-1 = unlimited) |
maxCookieSize | number | 4000 | Max size of the cookie. -1 disables cookie usage → disables attribution |
Note
The cookie stores all fields provided in the data object (for example id, placement, algorithm, and position) for up to seven days so they can be included in the purchase request for attribution.