[solved] trackEcommerceOrder not working anymore

On our checkout page we have the following code:


piwikTracker.trackGoal( 6, 31);
piwikTracker.trackEcommerceOrder("6333892487",31);
piwikTracker.trackPageView();

The goal is nicely tracked and visible in the Ecommerce Goals. However the order is no longer tracked (it used to work). If I make a new site in piwik and change the script to the new siteID, the order is tracked again.

var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {$IDSITE}); 

However it won’t work on our original site. How can I troubleshoot this?

See: http://piwik.org/docs/tracking-api/reference/#toc-debugging-the-tracking-api-requests

That debug is not really usefull in a live environment and I can’t simulate all the sales with different ip/browsers, etc. Some kind of log feature would be nice.

I have imported all missing sales through the API and that works, although it is missing information that way. I think the API calls the same url as the js tracking ,right?

Is there any reason you can think of why this won’t work?

To summarize:
On one page I make 2 calls, one for idgoal 6 and one for a completed order.
The one for idgoal 6 works and the completed order doesn’t work. (changing the order of the calls doesn’t change anything)
Doing the same thing for a different site_id makes it work (both are logged)
Using the API (doTrackEcommerceOrder) also works.

Ok, I solved it by finding my own topic on this forum:
http://forum.piwik.org/read.php?2,87731

Once again it was the magic_quotes setting that screwed it up. Even though this setting is deprecated it still checks for it and changes the input. Setting the value in php.ini explicitly to Off made it work again.

Why it still would work with another site_id is still a mystery but I’m glad I got it working again.