Goal tracking unexplained

I have been searching through hundreds of pages for an answer on this for over 2 weeks to no avail.
In other tracking solutions I have used, they clearly provide the goal tracking code to be inserted in the Thank_you pages, but here, it is not clear cut. I suggest that a code be generated when a Goal is created. (useful for non geeks like me)

I have various websites where the goal conversion page is the same.
In each website, I inserted the Tracking Code generated for that specific site and inserted the same exact code in the Thank_you page. Is that the correct manner in which it needs to be done? It doesn’t look right to me? What is the complete code I need to insert in the conversion page.

If each site has a different site ID what tracking goal do I insert in the Thank_you page? It surely isn’t going to be the same site ID, how in the world can the system determine which site generated this conversion? I have added the code below;

If any one has the patience to explain this to me in non geek wording, it would really be appreciated. Because I feel that this software has great potential but if I can’t use it, I will have to scrap it.

Have you seen http://piwik.org/docs/javascript-tracking/#toc-manually-trigger-a-conversion-for-a-goal ?

Yes I have. I have read it over about 12 times.
It only shows me bits and pieces on info and that is the problem I am confronted with.

In your thank you page, put


<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://xxxxx.ca/piwik/" : "http://xxxxxx.ca/piwik/"winking smiley;
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"winking smiley);
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 6);
piwikTracker.setDocumentTitle(document.title);
piwikTracker.trackPageView();
piwikTracker.trackGoal(1); // TRACK A GOAL CONVERSION IDGOAL=1
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://xxxxxx.ca/piwik/piwik.php?idsite=6" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->

A very Merry Christmas to you Matt. Thank you very much for in depth explanation.
I managed to configure a few things in this software including the GEO tracking but this one is just confusing to me.

Please bare with me for just a bit.

  1. This piece of code: piwikTracker.trackGoal(1); only goes into the Thank_you page and not on the website landing page, correct?
  2. And I should simply change the Goal ID for each separate campaign I wish to obtain goal conversion tracking for, correct?

So far so good.
Now if I am tracking conversions from say, 10 different websites each with its own distinct Site ID but all convert on that same Thank_you page, doesn’t it matter that the same Site ID in this piece of code remains the same in the Thank_you page?:
var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, 6);
Don’t I have to indicate the site ID for all 10 sites in the Thank_you page or simply remove the Site ID number?

Thanks again for helping this non-tech-guy out. I shall not bother you any longer after this. Keep up the good work.

  1. This piece of code: piwikTracker.trackGoal(1); only goes into the Thank_you page and not on the website landing page, correct?

Correct, you only track the goal conversion on the page that triggers the goal conversion.

  1. And I should simply change the Goal ID for each separate campaign I wish to obtain goal conversion tracking for, correct?

Correct

Don’t I have to indicate the site ID for all 10 sites in the Thank_you page or simply remove the Site ID number?

The site ID are required, otherwise they wouldn’t be in the code. Piwik needs to know what website to record the visit/page view/conversion for…

I am doing good Matt.

You stated: "The site ID are required, otherwise they wouldn’t be in the code. Piwik needs to know what website to record the visit/page view/conversion for…"
Therefore if I want to know which site the conversion actually came from, how do I modify the tracking code in the conversion page to represent one of the 10 sites?

At this moment, the goal conversion page has this snippet: var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, 6); (“6” being one of the ten sites)
To determine which site actually converted the goal, do I add all 10 Site ID’s in that one snippet of code such as; var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, 1, 2, 3, 4, 5, etc); ?

if I want to know which site the conversion actually came from, how do I modify the tracking code in the conversion page to represent one of the 10 sites?

To do this, the best way is to use Custom Variables.

For example define a custom variable with the website which brought the conversion to the page.


var websiteOriginated = 'Mysite.com';
piwikTracker.setCustomVariable(1, websiteOriginated, "");
piwikTracker.trackGoal(X);
....

Then you will get in the Goals report, the conversions, revenue, for each Domain / website. You can create many custom variables for other purposes too, see the doc for more info.

I am acquiring a serious intelligence inferiority complex here. But I am going to give it one last try as I don’t want to quit now that I’m so close.

The code you displayed above goes into which page, the Thank you page, the landing page or both?
I presently have it in this manner on the Thank you page. Please tell me if I got it correctly.

And like this in one of the several landing pages:

I am even willing to pay anyone to get this done for me to put an end to this Rubik’s cube puzzle.

Don’t bother answering my last question. After much consideration, I have decided to abandon the use of this tracking solution.

Piwik has a very sexy interface, but it is way too complicated to get it working right out of the box for a regular user like me.
It discourages me even more when I see all the questions and problems other users have in the forum.

Regards

I’m not entirely sure about that code snippet since the conversion is on the one thank you page, and not on the N landing pages. Plus, Piwik doesn’t provide direct support for cross domain tracking.