Piwik not tracking visitors

I’ve installed new Piwik 1.11 on a new domain and and a new hosting. Everything works well. Piwik saw my first visit on my site and… that’s all. Piwik is not tracking visitors. I’ve entered my site from different IP’s and different browsers and Piwik is not tracking.

The only weird message I’ve received is “The parameter ‘defaultReport’ isn’t set in the Request, and a default value wasn’t provided.” I saw this in Settings/User Settings when I’ve tried to change “Report date to load by default” from yesterday to today. I doubt this message is related with not tracking, but I have nothing else to report.

Please help.

can you check your server error logs for any error?

or check: Troubleshooting - Analytics Platform - Matomo

Unfortunately I have not acces to server error log. I will try to ask server admin for these.
However, I was able to check piwik database and only my first visit is there.

I compared piwik traking code with other two my domains and it is very different. I don’t know coding but it is normal to look like this?


Ok, I figured it out. There is an error in tracking code. The piwik directory wasn’t specified. I corrected in my site and everything is fine now. The corrected tracking code look like this now:

![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif) "

Original tracking code was generated with that error and still does. I don’ know why.

Yes, 1.11 generates a wrong tracking code, in which the directory under which piwik is installed is not included. It contains only the base domain name.

When I realized this I thought the problem was with the “Piwik is installed at: …” field on the General Settings page. I appended to the base domain name there the directory in which piwik is installed (i.e. changed domain.net to domain.net/piwik), but that broke piwik completely: all the piwik pages were filled with error codes. (The simple to this is to edit the config file back to show only the base domain, without the directory.)

So there are two bugs:

  1. If piwik is installed not in the root of website, the URL in the tracking code it generates is wrong.

  2. If the “Piwik is installed at” field on the General Settings page is changed ir breaks piwik completely. Piwik should prevent users from making such damage by mistake.

@pko, first bug is already fixed in repository and will be in next release. Sadly this wasn’t spotted during the beta.

One minor correction. The tracking code generated by 1.11 also has another error. The proper noscript tracking code to utilize is as follows.

1.11 generates a noscript portion code without the

tags. That caused that portion of the tracking code to be rendered inert.

see: http://piwik.org/faq/how-to/#faq_176

Now, after installing update 1.11.1 everything is fine. No more messages in User settings and no more errors in tracking code.

Thanks guys.

And when is this next release coming? This seems like a big “bug” since it breaks tracking completely.

It doesn’t break anything - Piwik still works fine. Only the tracking code displayed in the backend had some errors. Piwik 1.11.1 already contains the bugfix.