Items in ecommerce tracking code with entities


#1

Hi,

I have no idea what is going on, so I’d like to ask you for help.

My ecommerce piwik url generated by tracker is strange. For some reason it changes double quotes into entities (") and therefore in piwik log I can see error “Error while json_decode the Ecommerce items”

My code looks like this:

<script type="text/javascript">
    var _paq = _paq || [];
    _paq.push(["addEcommerceItem",
      "ABC-345",
      "prod name",
      "categoryname (3444)",
      259.99,
      1
    ]);
    
          _paq.push(["trackEcommerceOrder",
            "229",
            332.7788,
            319.79,
            62.2288,
            12.9888,
            false
          ]);
</script>

After this code there is “normal” piwik code to track page view. async request is being made, but with products like:

ec_items="[[“ABC-345”%2C “prod name”%2C “category name (3444)”%2C 259.99%2C 1]]"

Can you please advice?


(Matthieu Aubry) #2

WE think that you use an old of Prototype on your website. Update prototype.js


#3

Yes, on checkout page I have prototype, and it hasn’t been updated for some time now…

I will try that tomorrow, however…

Can you tell me how exactly this is happening? Is there any function names conflict or something like that? I’m curious…


(Matthieu Aubry) #4

old prototype is buggy