Thesis and Piwik - adding tracking code?

Hello everybody, new here, only just installed Piwik, looking forward to being able to track my sites without relying on Google all the time.

However, I use Thesis for most of my websites and Piwik needs the tracking code installed on each page, typically in teh footer template is easiest, however, I don’t have a footer template?

I have the following templates:
Archives Page Template, Home Page Template, Custom Template Page, Main Index Template, No Sidebars Page Template.

I also then have custom_functions.php, comments.php and functions.php!

Where do I place my code?

Many thanks


I’m also a Wordpress user, but----I use the “Gantry Framework” with Rockettheme Wordpress developers Wordpress themes. I expect it to be a hell of a challenge to add this to the gantry setup.

Greg, any ideas yet where to place the tracking code?

Why don’t you put in Piwik in same spot where you have (or had) Google Analytics? Use the async tracking if Google was added to the header else the normal tracking code.

Greg and any others who use Thesis, here is where to place the code:

You need to insert the tracking code in the Thesis Site Options page (Stats & Tracking Scripts), second to last option on the left of the page. Although this is likely more elegant than using a plugin, there are two plugin options available. I haven’t tried either of these myself, but rumor is that one of them (WP-Piwik) works quite well, and is updated regularly. You may find it in the usual Wordpress Plugin repository, but I also think it is available on the Piwik main site.

Secondly, the tracking code required for insertion into the location specified above must be obtained from the Piwik ‘Websites’ page: Settings --> Websites. There you will find a table with the list of all websites monitored. For each separate Site ID (seen in the left-most column), there will be a corresponding tracking code available in the right-most column.

I have setup a sub-domain so I can track all my sites, most of which are Thesis, and shortly all will be Thesis anyway, so it makes it easy!

I will let you know when I start gathering stats if this actually works, as i have the plugin installed but am thinking that maybe I will uninstall it and simply use the sub-domain for reporting. I just thought that the plugin would make it easier by putting it all in one place.

Where is the tracking code to be found. I can not even find my damn tracking code, in order to try and use it…

Greg, you need to navigate to where you installed Piwik!

This may have been in a folder on one of your main domains or as I did - setup a sub-domain to do all my tracking off of my main website.

Once you are there, you should have the login screen, if you have set everything up correctly? Did you set up your database prior to installation?

Once logged in, you will see a whole lot of graphs and charts, all for tracking. At the top right of the screen it says “Settings” - click this and on the next page you will get another menu, the third one along is “Websites”, click this and it will display a list of your sites.

The site ID will be the left hand column, typically starting with 1, and the furthest most column heading says “Javascript Tracking Code” with a clickable link underneath which says “View Tracking Code” click this and it will give you the tracking code to copy and paste!