With grouped products
Description
If the online store's product database contains group products, then on the product card pages you need to call the rrApi.groupView tracking code, and pass to it an array of all product IDs from the group, united under one group_id.
It should also be called when the quick view window is opened, if such functionality is available on the site.
The group_id itself does not need to be passed to the tracking code.
- Without regionality
- With regionality
<script type="text/javascript">
(window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
try{ rrApi.groupView([<product_ids>]); } catch(e) {}
})
</script>
<script type="text/javascript">
(window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
try{ rrApi.groupView([<product_ids>],{"stockId": "<stock_id>"}); } catch(e) {}
})
</script>
Region ID
<stock_id> - region identifier, can be a string. Must match the region identifier passed in the product database.
Support for string identifiers
If the product identifiers in the product database have string identifiers, an object with the isProductIdString parameter must also be passed to the tracking code, an example is shown below.
- Without regionality
- With regionality
<script type="text/javascript">
(window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
try{ rrApi.groupView([<product_id>], {"isProductIdString": true}); } catch(e) {}
})
</script>
<script type="text/javascript">
(window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
try{ rrApi.groupView([<product_id>],{"stockId": "<stock_id>", "isProductIdString": true}); } catch(e) {}
})
</script>