0

We have the following snippet in order to track cart in our website using the MC Collect Code:

<head>


<script type="text/javascript" async src="https://REMOVED.collect.igodigital.com/collect.js"></script>
</head>
<body>
<script>
_etmc.push(['setOrgId', 'REMOVED']);

_etmc.push(['trackCart', {
    'cart': [
        {
            'item': 'A',
            'quantity':  '5',
            'price': '1',
            'unique_id': '1'
        },
        {
            'item': 'A',
            'quantity':  '5 ,
            'price': '1' ,
            'unique_id': '2'
        }
    ]
}]);
</script>
</body>

However, when going to the Status tab in email recommendations Track Cart Activity remains 0.

Please help what is wrong the code above, Thanks Barak

4
  • Have you verified that items added to cart actually are in your catalogue? Commented Dec 22, 2021 at 20:40
  • Hi Lukas, yes I have double checked that. Also when using Chrome network tool, no payload is being sent as far as I can tell. So I don't believe it reaches this step where items are being validated aginst the catalogue.
    – Barak
    Commented Dec 22, 2021 at 20:46
  • what is the status in the dev console on your browser? 200? 403? have you created a recommendation yet?
    – EazyE
    Commented Dec 22, 2021 at 21:08
  • It was 200 for the collect.js file. Did not try to create a recommendation since the collect not working.
    – Barak
    Commented Dec 22, 2021 at 23:47

1 Answer 1

0

please add this also

_etmc.push(['setUserInfo', {'email': 'INSERT_EMAIL_OR_UNIQUE_ID'}]);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .