I just installed Piwik on my server. I set up my Domain inside Pikwik and added the tracking-JavaScript to my site ( http://www.zoosau.de ).
Piwik is available at http://www.zoosau.de/piwik/ and my tracking-JS, embedded like this:
But no visitor is displayed in Piwik ( I visited the site several times from different IPs today myself ).
One point in the Piwik FAQ suggests to have a look at the table “piwik_log_visit” if there are any visitors recorded. There’s not, the table is empty.
But this hasn’t worked - I got no visitors tracked.
After a few hours I installed the Plugin “Piwik Analytics” to my WordPress ( Piwik Analytics WordPress Plugin - Forward Slash ), which created the code, which I first posted.
None of these both variants seems to work for me. Since the above Code from within Piwik itself looks a lot different from the Plugin created one ( which I cannot edit as you mentioned ) I’d like to do the analysis with this code.
I changed my Site temporarly to another Dir, where just 1 single index.html file is available:
<html>
<head>
<title>Just a Piwik Testsite</title>
</head>
<body>
Just a Test ...
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.zoosau.de/piwik/" : "http://www.zoosau.de/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://www.zoosau.de/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>
This is exactly the Piwik code from the Piwik Backend. And I get no visitors recorded to piwik ( MySQL table “piwik_log_visit” is still empty ). Since there’s simly no other code left, it has to do something with piwik.
Since I’m having the same issue, roughly, I followed your instructions and here’s my dump…
Debug enabled - Input parameters: array ( ‘idsite’ => ‘1’, )
Loading plugins: { Provider,Goals }
Current datetime: 2011-04-25 02:46:04
GET parameter rec not found in URL, request excluded
Visitor excluded.
→ Scheduled tasks not triggered.
Next run will be from: 2011-04-25 03:36:15 UTC
Nothing to notice => default behaviour
End of the page.
array (
)
Time elapsed: 0.019s
I had Piwik working and reporting on my Wordpress installs last year, then it stopped reporting.
piwik_log_visit shows visitors, but dashboard shows zero.
I was using the plugin, just now pasted the js in the footer of my WP installs. I’m aware that WP went through some major changes recently and this may be the issue. But I’d like a reading of my dump, please.
I admit to being technically-challenged, exp. with terminal commands. I used C/P to change my /core/Piwik.php file to match the diff. Logged in and see no changes, but am thinking that perhaps it needs to “reboot” somehow or have the cache cleared to work from those changes? Can’t find a GUI way to do that, can SSH in if know the right command to use.
Since I pasted the tracking code in my footers yesterday I have one visit, which was myself messing with sites last night. DB usage shows many more.
EDIT: Went into db and found that no tracking has occurred for months. Yes, this means I wasn’t watching it for a while, but it also probably means that an upgrade at some point stopped tracking without any warnings, and now I have no data on the transition work I was doing on my websites, which is why I installed it in the first place. So no need to continue helping me, I nuked Piwik. Thank you for your efforts and replies.
sorry for not replying for 4 days … I was not in the office and had no I-net the last days …
Unfortunately, I can not test what you suggested: When I’m trying to open the address you suggested, my server offers me a zero-sized file named piwik.php for download. This happens regardless of the debug-mode.
I have setup Piwik like documented. That my Webserver provided an empty PHP file instead of rendering it, made me wonder. I knew this has to be an issue with the code itself within this file. Since this is valid, I tried to follow the code within piwik.php and found the following:
The file uses a Database resource, which is defined in config/global.ini.php and is overwritten by the content of whatever is defined within config/config.ini.php .
There is a part for the database config within these files :
In global.ini.php it reads:
[database]
...
adapter = PDO_MYSQL
...
This becomes overwritten with the following from config.ini.php :
[database]
...
adapter = "MYSQLI"
...
So I just edited my config.ini.php to use “PDO_MYSQL” instead of “MYSQLI” and now it works!
This seems to be a bug in the automatic routine for what’s available and functional insede the Piwik installer, since it set MYSQLI even it isn’t working on my server.
If anybody of the developers wants to get further details about my machine, I can provide them. Just ask.