Ecommerce Tracking, difference between product sku and product name visits

Hi,

I do not understand the following stats under Ecommerce & Goals > Goal Ecommerce conversions by type of visit > (Product SKU or Product Name) > Abandoned Carts:


Product SKU | Product Revenue left in cart | Quantity left in cart | Average Price | Average Quantity left in cart | Visits | Abandoned Carts
@Product SKU: Productname, color | 5 € | 1 | 5 € | 1 | 1 | 1
@Product Name: ID-120 | 5 € | 1 | 5 € | 1 | - | 1

Same Product(-id) but different visits. How could this be? And, how could a product beeing added without visiting it? :slight_smile:

The code on product visit:


    var _paq = _paq || [];

    _paq.push(['setCampaignNameKey', 'campaign']);
    _paq.push(['setCampaignKeywordKey', 'key']);

   _paq.push(['setEcommerceView', 'ID-120', 'Productname, color', ["category1", "category2"], 5]);
        
    _paq.push(["trackPageView"]);
    _paq.push(["enableLinkTracking"]);

    (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://url";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
    })();

The code on the same! page, after the product was added (only shown once after add):


    var _paq = _paq || [];

    _paq.push(['setCampaignNameKey', 'campaign']);
    _paq.push(['setCampaignKeywordKey', 'key']);
      
    _paq.push(['addEcommerceItem', 'ID-120', 'Productname, color', ["category1", "category2"], 5, 1]);              
    _paq.push(['trackEcommerceCartUpdate', 5]);
                
    _paq.push(["trackPageView"]);
    _paq.push(["enableLinkTracking"]);

    (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "url";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
    })();

How is this aberration possible? My mistake?
Thanks for help.

tip to myself:

it seems to be important to put the _paq.push calls inside the (function() {…}. thank you brain! :slight_smile: may this was one fault. I am not able to reproduce that behaviour anymore. nice.

some details in the documentation could be a little more made for idiots like me :wink:
e.g. this topic, Ecommerce tracking - Added Items are always shown as abandoned cart · Issue #2528 · matomo-org/matomo · GitHub i thought this was a “bug” too, because the behaviour wasnt explained anywhere, or? that picture helped me too http://dev.piwik.org/trac/attachment/ticket/2528/add-remove-items-in-cart.png, it shows me how it has to be, if it’s working fine. I had no idea of. :slight_smile:

now i think, it’s fine. nice work guys. thank you very much for piwik.