Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Try to Track ECommerce in custom platform

$
0
0

@Squidster wrote:

I’m trying to embed eCommerce tracking in my customer marketplace platform. I have tried the sample addEcommerceItem, trackEcommerceOrder and trackPageView, and it worked once, last week.

This week, I tried to expand it, the code no longer worked; i.e. there is no more update. Anything wrong with the code below?

Each item is like this:
{“id”:745,“name”:“Gloink - Samsung MLT D116L Compatible Toner Cartridge”,“category”:1,“price”:11200,“quantity”:“1”}

                r.matomo.forEach(function(item) {
                    _paq.push(['addEcommerceItem',
                        item.id,
                        item.name,
                        item.category,
                        item.price/100,
                        item.quantity
                    ]);
                });  

                _paq.push(['trackEcommerceOrder',
                    "ABCD1234", 35, 30, 5.5, 4.5, false
                ]);  

                _paq.push(['trackPageView']);

Posts: 3

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles