• Please help me with this problem:

    I have a wordpress site that I’ll call “example1.com”. It uses the wp-piwik plugin.

    My piwik installation is located at:
    piwik.example1.com
    …The plugin seems to be working fine and I was able to see the stats via the piwik GUI.

    Then I decided to add another domain (example2.com). I added the wp-piwik plugin there and adjusted the settings (using the same identical “Auth Token”) and the “Determined site” shows “example2.com” but when I do a “view page source” on a page at example2.com, I see it pointing to piwik.example1.com.
    Then I went to the piwik GUI and added the new domain in the settings. But:
    1. If I try to view the piwik stats in the wordpress dashboard of example2.com, the “WP-Piwik Overview” stats there show the exact same numbers as the ones that show over at example1.com.
    2. If I go to the Dashboard of the Piwik GUI and try to get the stats for example2.com, I get the “No Data has been recorded yet” page.

    Can you help me understand what’s wrong?

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

    (@braekling)

    Pointing to piwik.example1.com is correct, because this is your Piwik server, isn’t it? Or did you set up a second Piwik instance using piwik.example2.com?

    You have to check the site ID. Is the site ID mentioned in the tracking code the example.com Piwik site ID?

    I suppose with “adding a second domain” you mean two blogs (a blog network) using different domains but the same WordPress instance, don’t you? If your WordPress wasn’t a network before, please check if the plugin is configured as a network plugin:
    https://www.ads-software.com/plugins/wp-piwik/installation/

    Thread Starter patrick_here

    (@patrick_here)

    Yes, piwik.example1.com is my piwik server.

    Regarding the Tracking code …no that’s the problem: the piwik server (pwik.example1.com) is mentioned in the tracking code but example2.com doesn’t appear anywhere in the tracking code. The “Add Tracking Code” dropdown is set to “Default Tracking”. This looked wrong to me but I couldn’t figure out what to do about it.

    No, when I said that I added a second domain I meant that I added it in the Piwik GUI as a second domain to be tracked: example2.com is a separate wordpress blog in a separate directory on the same host (not a blog network) with a separate wp-piwik plugin installed, of course.

    Thanks in advance for the help.

    Thread Starter patrick_here

    (@patrick_here)

    Also, the tracking code that shows up in wp-piwik is the same as the one that shows up in the Server GUI itself for this site (and yes, it does show up in the source for the pages of the site). The site has an ID of 7 and the ID shows up in the tracking code:

    _paq.push([‘setSiteId’, ‘7’]);

    Plugin Author braekling

    (@braekling)

    The domain (example2.com) should not appear anywhere in your tracking code. So this behaviour is absolutely correct.

    So, if ID 7 is the new site’s ID (in Piwik) and the tracking code sets the site ID to 7, everything looks fine.

    You are sure example2.com already collected data? Keep in mind WP-Piwik by default does not add the tracking code for logged in (admin) users. So if nobody is visiting the new blog yet, and you are excluded from tracking, the Piwik data stays empty.

    If you are sure there should be data already, please have a look at example1.com’s stats – do example2.com visits appear there?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem adding second domain’ is closed to new replies.