Multiple Piwik Trackers in Piwik 2.3 (7 posts)

  1. member11
    Posted 1 year ago #

    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.



  2. braekling
    Plugin Author

    Posted 1 year ago #

    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?

  3. member11
    Posted 1 year ago #

    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

  4. member11
    Posted 1 year ago #

    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.


  5. braekling
    Plugin Author

    Posted 1 year ago #

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

  6. member11
    Posted 1 year ago #

    thanks for your help.

    Piwik.org 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.


  7. braekling
    Plugin Author

    Posted 1 year ago #

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

    Maybe this will help: http://my.safaribooksonline.com/book/-/9781849518482/3dot-tracking-visitors-with-piwik/id286762333

    Otherwise try to ask the Piwik community at http://piwik.org

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Piwik
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic