Algorithms Reporting
- 08 May 2024
- 1 Minute to read
Algorithms Reporting
- Updated on 08 May 2024
- 1 Minute to read
Article Summary
Share feedback
Thanks for sharing your feedback!
Using any of the Smart Recommender endpoints to display product recommendations on your website, you can also keep track of their performance.
The results of Insider Smart Recommender can easily be tracked through Enhanced Google Analytics Integration. This method enables you to send impressions and click events to Google Analytics.
Best Practices
- Migration and Compatibility with Ecommerce Plug-in (ecommerce.js) should be considered. Please refer to Google's Enhanced Ecommerce guide for further details on the integrations.
- If you want to keep track of viewable impressions, you should send an impression event accordingly.
- Remember to set the currency code information as shown below before sending the impression and click events.
ga('set', 'currencyCode', 'EUR'); // Set currency
- The value of the List parameter should correspond to the campaign details. For example, if the campaign title on the Home Page is "Selected for You," the parameter value can be "HomePage."
Event Implementation
The following parameters can be used when sending impressions and click events for the recommended items.
Parameter | Description |
---|---|
id | Code of the recommended item |
category | Category tree of the recommended item |
brand | Brand of the recommended item |
variant | Variants of the recommended item. E.g. color, size etc. |
list | Campaign name of the recommendation |
position | Position of the recommended item |
currencyCode | Currency of the recommended item |
Event Examples
Please see the example functions to send impressions and click events for the recommended items.
Make sure to send the impression and/or click event separately for each recommended item.
Impression Event Implementation
ga('ec:addImpression', {
'id': 'P12345', // Product details are provided in an impressionFieldObject.
'name': 'Android T-Shirt',
'category': 'Apparel/T-Shirts',
'brand': 'Google',
'variant': 'ub',
'list': 'HomePage - Mobile,
'position': 1 // 'position' indicates the product position in the list.
});
ga('ec:addImpression', {
'id': 'P67890',
'name': 'YouTube Organic T-Shirt',
'category': 'Apparel/T-Shirts',
'brand': 'YouTube',
'variant': 'ub',
'list': 'HomePage - Mobile',
'position': 2
});
Click Event Implementation
function onProductClick() {
ga('ec:addProduct', {
'id': 'P12345',
'name': 'Android T-Shirt',
'category': 'Apparel',
'brand': 'Google',
'variant': 'ub',
'position': 1
});
ga('ec:setAction', 'click', {list: 'HomePage - Mobile'});
// Send click with an event, then send user to product page.
ga('send', 'event', 'UX', 'click', 'Results', {
hitCallback: function() {
document.location = '/product_details?id=P12345';
}
});
}
<a href="/next-page.html"
onclick="onProductClick(); return !ga.loaded;">
Android Warhol T-Shirt
</a>
Was this article helpful?