I read up on stuff a few days, added ~20 websites to the stats and am amazed how nice it is.
Although I do not like Google’s information gathering, we do have some nice sales reports there and they all seem to match quite well.
With piwik, not so much
I’ve been struggling with these ecommerce goal tracking links for a while now, tested on all kinds of variations, none seem to work. We use version 1.2.1
trackGoal takes the goal ID. This is different from idSite. That said, multiples goals can be associated with a site. (many-to-one) A goal id cannot be shared between multiple sites.
So it is okay that many goals have id=1, as this is still matched with the current url? In short: 5 different URLs can all have goalid=1, and yet piwik knows that these are different websites/stores?
In the next Piwik release, you can enable multiple conversions per visit.
We also moved the revenue parameter closer to the start of the tracking request, in case your web server truncates it prematurely.
In this case, the proper fix would be to reconfigure the web server (increasing the max request length, or request header size) or use setRequestMethod(‘POST’).
I’m actually uploading that release now. Taking a while though, been going at it for about 10 minutes ;-))
Edit:
I’ve been thinking about that feature though, why on earth would anybody want to track each goal only once?
Unless we’re not on the same page as to what our issue is, i really do not see the point of tracking it only once, haha.
Let me clarify that on our end each goal triggered is from another customer, not the same customer (unless he is a frequent visitor, in which case i do understand the new feature). Anyway, I’ll check in tomorrow to post results.
However my goals are registered, but not the price of the object.
I’ll put here exactly what I have and if we cannot solve it, we’ll check back some versions of piwik later:
Goal name: Sales
Where url contains: /checkout/onepage/success/
Checked: Allow Goal to be converted more than once per visit
Goal default revenue is 0
Other than that, the code from the first post is still used, except for the change in the goal id, which we set to 0, the same id as the Sale Goal.
I’m not an idiot, everything looks pretty tight, yet it’s not calculated right. Do we need to change the “where url contains” to something else? This is how we had set it up in Adwords.
On another website that is not Magento driven, we track an outgoing link which does work, as follows:
<script type="text/javascript">
//<![CDATA[
// Create a var in the global scope.
// Can be accessed by any Javascript that follows, anywhere in the page.
var phpJsCashPiwi = "10";
//]]>
</script>
The only difference i can see (with my knowledge) is on the one (working) page, the var is hardcoded, within magento the var is filled with variable from php. However, when i look at the source code in both pages, the javascript code if filled in exactly the same.
Now that i think of it, the only difference might be the decimal point. Could it be there’s a bug in Piwik preventing numbers with decimals to be stored?
Piwik works with the period (.) as the decimal point. It probably won’t work if the incoming data uses commas, e.g., “10,50”.
The other thing to check is if your web server has a limit on GET request lengths. This can cause the tracking request to be truncated. (In some versions of piwik.js, the revenue was the last parameter in the request.)
Strange thing is it does work on one storefront, and not on another.
I recreated the goal and it did register one of my testsales. I’ll have to wait for more sales in that certain shop to see if it works there now all the time.