Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use piwik analytics to track the visitors to my website. I recently created a blog on WordPress and wanted to added the same tracking code that I use on the plain HTML webpage. How can I added the tracking script in the php in order to track my blog visitors?

thanks!

share|improve this question
    
This plugin helps to include tracking-codes (not only for Piwik, but also Google Analytics etc). –  user31458 Apr 13 '13 at 20:08

2 Answers 2

up vote 1 down vote accepted

Add the tracking code to one of your theme files, most likely footer.php.

The easiest way to do this is to go to your admin panel and go to Appearance > Editor, and on the right side, find the entry for Footer (footer.php), and then insert the code right before the closing </body> tag. Update the file by clicking the button below the text box, and you should be good!

share|improve this answer
    
Thank you, I was adding it to my templates but the footer worked much better! (I'd give you an upvote but alas not enough rep!) –  Nick Aug 15 '11 at 12:56
    
No problem, glad it worked! –  Joshua Aug 16 '11 at 1:04

You'll find Step by step instruction on how to install Piwik on the Wordpress site here.

share|improve this answer
1  
+1, but an answer should be more than a link. Please read a bit in the FAQ to get a better feeling how this site works. Thanks. –  kaiser Oct 8 '12 at 8:37
1  
The external website is about installing Piwik via Cpanel ... so most of the article is not related to the original question. @wpboss ... its ok to answer a question and reference an article on your own website, but don't over do the linkbaiting / SEO –  Damien Oct 8 '12 at 8:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.