Firebug


(SeanK) #1

Hello,

Using Piwik 1.1.1.

The firebug tool (http://getfirebug.com/) reports that my Piwik javascripts are creating “404/410 responses.”

The 404 link mentions the full Piwik URL with idsite rec m s url…
Logically, I would think that those links should generate a 404.

Is it normal to get a 404 when trying to browse to Piwik tracking data URL?

Sean


(vipsoft) #2

Easy enough to test from your browser. Try to open piwik.php


(SeanK) #3

Thank you for your message.

I have no issue getting to /piwik.php, it works fine.

My concern of my original post is that Google sees 404 messages on my website when their robots are out sniffing around or is Piwik smart enough not to pass a tracking token to a robot.

Sean


(vipsoft) #4

Sorry, I don’t understand why Firebug is showing 404/410.

Are you saying you use piwik to track 404/410 responses (eg custom error page)? If so, Google’s smart bot (if detected by Piwik) is ignored and doesn’t receive a tracking cookie.


(SeanK) #5

I am not tracking 404 pages in Piwik.

My issue is dealing with a visitor arrives at a page, data is passed to Piwik in the form of a URL.

http://www.example.com/piwik/piwik.php?idsite=1&rec=1&rand=0.610803123870186&h=13&m=4&s=55&url=http%3A%2F%2Fwww.example.com%2Fexample.html&urlref=http%3A%2F%2Fwww.example.com.com%2Fexample.html&res=1280x1024&cookie=1&pdf=1&qt=1&realp=0&wma=0&dir=1&fla=1&java=0&gears=0&ag=1&action_name=Company

Google sees that URL as a 404 because the URL is I assume virtual. If the URL is not virtual then maybe I have an issue. When I click on the URL I also get a 404.


(vipsoft) #6

OIC. If accessing “piwik.php” works, but the full URL with parameters doesn’t, then you likely have some restriction on the GET request length, and/or you have some filter (e.g., mod_security) in place that either needs to be disabled or set to whitelist your domain.

You might be able to bypass those hosting restrictions by using:


tracker.setRequestMethod('POST');

before calling trackPageView.


(jekko) #7

@ SeanK

you should configure an .htaccess file to keep google out of your piwik directory!!

Htaccess


(SeanK) #8

The answer was:

How do I configure Piwik when mod_security is enabled?

  • edit your Piwik Javascript Tracking code to force data to be sent in POST, to avoid the mod_security check.

  • Before the line piwikTracker.trackPageView();
    add the following line piwikTracker.setRequestMethod(‘POST’);

Thanks vipsoft!