Support » Plugin: WP-Piwik » Multiple Piwik Trackers in Piwik 2.3

  • I refer to this change in the 2.3 version of Piwik relating to tracking data from a website in multiple versions of Piwik.


    I want to ask if you have plans to incorporate this change into the wp-piwik plugin? If not, how do you recommend applying this change to my websites in the meantime? i.e. should I stop using wp-piwik and hard code the script into my websites or continue using wp-piwik and apply the code manually in another way?

    thanks for your advice.


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author braekling


    This feature is not planned for WP-Piwik yet. But it is planned to allow individual tracking codes defined by the admin.

    Meanwhile: You can still use WP-Piwik, but should disable its “Add tracking code” feature and add your own tracking code to your site manually.

    Out of curiosity: Why do you want to use different Piwik trackers for your site? This will also cause a javascript overload, won’t it?

    thanks for the reply.
    I’m wanting multiple trackers because I have a number of site networks I want to track both individually as well as globally from a management perspective.
    As for the javascript overload, I wasn’t aware this would happen. I guess I’ll just have to test once I’m able to set it up.

    thanks for your help

    How/where is the best place to “add your own tracking code to your site manually” if I disable WP-Piwik “Add tracking code” feature.


    Plugin Author braekling


    Just open your theme’s header file and add it there.

    thanks for your help. provides this code as an example for multiple trackers, but I can’t seem to get it to work. Do I need to be adding more?

    <script type="text/javascript">
    window.piwikAsyncInit = function () {
        try {
            var piwikTracker = Piwik.getTracker("http://subdomain.URL_1/", 1);
            var piwik2 = Piwik.getTracker("http://subdomain.URL_2/", 4);
        } catch( err ) {}

    I understand this falls outside of plugin support for you, but thought perhaps you could point me in the right direction.


    Plugin Author braekling


    Did you load piwik.js? You have to load the piwik.js file before you call the trackers.

    Maybe this will help:

    Otherwise try to ask the Piwik community at

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multiple Piwik Trackers in Piwik 2.3’ is closed to new replies.