Title: piwik.php
Last modified: August 20, 2016

---

# piwik.php

 *  Resolved [prefect](https://wordpress.org/support/users/prefect/)
 * (@prefect)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/piwikphp/)
 * hi there,
 * first let me say I love the plugin, its awesome.
 * my question is, I am using the piwik.php method of tracking so that all my sites
   aren’t pointing to the same piwik server in the code at the footer.
 * example of the tracking code I use:
 *     ```
       <script type="text/javascript">
       var pkBaseURL = (("https:" == document.location.protocol) ? "https://##DOMAINBEINGTRACKED##.com/" : "http://##DOMAINBEINGTRACKED##.com/");
       document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.php' type='text/javascript'%3E%3C/script%3E"));
       </script><script type="text/javascript">
       try {
       var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", ##SITENUMBER##);
       piwikTracker.trackPageView();
       piwikTracker.enableLinkTracking();
       } catch( err ) {}
       </script>
       ```
   
 * note that piwik.php is used instead of .js as well as the ## variables, etc.
 * I do this so it’s not so easy for my competition to figure out what all sites
   I have in my network, having no central piwik server definied.
 * the ##DOMAINBEINGTRACKED## being the site I’m gathering stats on vs. pointing
   at that central piwik server.
 * [http://wordpress.org/extend/plugins/wp-piwik/](http://wordpress.org/extend/plugins/wp-piwik/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/piwikphp/#post-3192692)
 * You talk about this one, didn’t you?
    [http://piwik.org/faq/how-to/#faq_132](http://piwik.org/faq/how-to/#faq_132)
   [http://dev.piwik.org/trac/ticket/2019](http://dev.piwik.org/trac/ticket/2019)
 * Maybe I can add this functionality to WP-Piwik. I’ll give some thought to this.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/piwikphp/#post-3192787)
 * Work in progress.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/piwikphp/#post-3192799)
 * Added in 0.9.8. Release very soon.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘piwik.php’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [braekling](https://wordpress.org/support/users/braekling/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/piwikphp/#post-3192799)
 * Status: resolved