First of all I would like to say thanks allot Piwik team for the amazing software.
My question is about the goals, I have set a couple of goals, 1 was easy it was just a page which has to be entered but others were a bit more difficult, there had to be a form submitted but in the data which shows up on the submit I added the following code which I hope works:
Anyway, my question is about the page(1) which is tracked as a goal. On the page before that page(2), data is entered which calculates a price on page1 (with cookies). When the price is calculated it would be very nice to view what price has been calculated in piwik.
Is this possible with piwik? and if yes is there some sort of guide to accomplish this or could anybody here help me further?
You can see the example page -google search “bereken dakgoot kosten”-*, the page is in dutch but it can help showing what I mean.
*keep getting “You have entered a link to a website that the administrator does not allow links to”
You’ll have to pass the amount from the previous page to the second page, e.g., using a query parameter or a cookie value. You can then pass that amount to Piwik when you record the goal, i.e., .trackGoal(idsite, revenue)
Hmm, I’ve been testing but can’t seem to get it to work, can’t seem to get it to work without the extra value either actually… on my visitor log i dont see the flag with data next to the page where it should show. anyone with an idea how this can be? I thougt maybe because I had the piwik code twice on my page one for the goal and one for tracking visitors
http://www.dezinkspecialist.nl/bereken-dakgoot-kosten/prijs-berekend.html
(there will be data if you click the top menu "indicatieprijs" then enter the fields and press berekenen)
Hope someone is willing to help.
edit:
I see it is working! but the only place i can see the calculated numbers is at the page goals, it does not show at live visitors.
When u used a comma in the price this did not work, now i have:
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://http://www.dezinkspecialist.nl/piwik/" : "http://www.dezinkspecialist.nl/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var startnumber = "1350,36";
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackGoal(3, startnumber );
} catch( err ) {}
</script>
and hoping the prices will show like €1350,36 instead of €135036,00
or should I change the comma in a dot?
I am still looking for a solution on how to display the goal prices and which goals have been achieved, is this possible at the moment with the recent updates of piwik?