I a trying to track down not only visitors but bots as well (google,bing, facebook scraper etc.).
After some tests I noticed that some bots parse the image tracker url like this
<img src="http://domain.com/clients/metrics-analytics/piwik.php?idsite=1&rec=1"
instead of
<img src="http://domain.com/clients/metrics-analytics/piwik.php?idsite=1&rec=1"
That confuses piwik somehow…
The debugger returns this when I try to visit the image url :
Debug enabled - Input parameters: <br/>array ( 'rec' => '1', 'amp;idsite' => '1', )
Loading plugins: { Provider,Goals,BotTracker }
Current datetime: 2012-03-14 15:15:32
Invalid idSite
Backtrace:
#0 /home/content/90/8889490/html/clients/metrics-analytics/core/Tracker.php(110): Piwik_Tracker_Visit->setRequest(Array)
#1 /home/content/90/8889490/html/clients/metrics-analytics/piwik.php(83): Piwik_Tracker->main()
#2 {main}
I suppose you convert the given url to an array using explode(’&’… or something similar.
A solution to this would be to replace all the “&” strings to “&” using the str_replace() function but I have no idea what file to mess with.
Can you help me out with this please?