Tracking code not working


I installed the piwik installation. and copied de tracking code before the /body tag. Anyway piwik does not recognise any users.

If I try the code in the browser ( then piwik is traking.

Well I want to use the tracking code but it is not functioning so far. What I’m doing wrong?

The used trackingcode is:

(Vasilis Lourdas) #2

How do you know that tracking does not work? Have you let 24 hours pass after installation of the tracking code?


Currently the tracking code is in the header of your site (lines 81 - 95).


@Vasilis Lourdas: I thought I can see the tracking already after 10seconds… I don’t believe I need to wait for 24 hours to see tracking!!

@PeterV: Correct… I was testing a lot in the hope something was working and forgot to put it back were it belongs. Anyway I put it before the /body again…

The problem is still there

(Vasilis Lourdas) #5

As I recall, by default Piwik does not show the visits for the current day. However, if you set the date range to include the current day, it does show them.


In the dashboard I see: Date Range: 2014-08-31… Then I think today is the day I’m looking too…is that what you mean? I can’t see there any track information


I just activated the plugin DBstat. Inthere I can see this info:

                                            datasize   index size row count

piwi_log_link_visit_action 404 B 4 K 8
piwi_log_visit 144 B 5 K 1

I generated those row counts by hand with “

With the trackingcode before the /body… I can’t see no additional row counts. So yes 100% sure that the code is not working untill now.

Hope somebody can help


I still can’t see any tracking information in Piwik.

Hope somebody can set me on the right track… Were to start with problem solving, what can I check?

Thanks again


I just visited your page and Piwik script executed correctly, but it’s being blocked with error 403 forbidden, check in Settings> General Settings under Trusted Piwik Hostname if your Piwik host is added there.


thanks for your message.

The hostname is filled with

How did you saw that it is blocked with message 403?

Best regards

(Vasilis Lourdas) #11

By directly calling the tracking url in his browser and reading the HTTP response.


I tested it with: the result looks good.

It’s not the link you tested or?!

(Vasilis Lourdas) #13

The HTTP request for the Piwik tracking code is initiated with JS. So you must use the console window in Firefox (press F12), Chrome, etc. to see the actual request and its response code. The url you display above has nothing to do with Piwik.


thanks, I’ve got the error!

Well the requested url with generate the 403 error is:

If I only try with the url: the it is adding a record and not giving a 403 error.

I really do not know were I need to search for the 403 error. I is given “forbidden” or no access…but the url is not blocking anything…

So were do I need to search for more rights?!


Problem is solved…

Adding to the Whitelisting was the sollution

(Matthieu Aubry) #16

So were do I need to search for more rights?!

see How do I configure Piwik when mod_security (or CA SiteMinder) is enabled? - Analytics Platform - Matomo