With grouped products
Description
If the website contains grouped products, then you need to use tracking code rrApi.groupView, and pass in it an array of product IDs, which are combined by a single group_id.
These IDs must match IDs, which are passed in the product database.
Besides, this tracker should be called on the quick view window, in case the website has this functionality.
group_id should not be passed in tracking-code.
<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)
<stock_id> - Identifier of the stock to which products belong, string. Must match identifier of stock, which is 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 additionally be passed to the tracking code. The example is given below.
<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>
Updated about 1 month ago