No more data after Matomo update


#1

Hi, I’m using Matomo (Piwik) for some years now. Did not have many problems all those years. And if any, than I was able to resolve them. But now, after a update to the latest version of Matomo, I do not get any data from the sites monitored ? I have had a look at all settings, even installed a new download over my existing Matomo version. The Matomo is running on a Debian server. The system control does not have any error. The implemented tracking code seems ok to me. So I am out of ideas where to look at and find the problem.

This are some of the sites monitored: https://hocom-advies.nl and https://pizzajolly.nl from which I received the data until last week. Also the detail-visitor logs are empty.

Any idea how to solve this? What else can I try?

Matomo-versie: 3.7.0
MySQL-versie: 5.6.42
PHP-versie: 7.2.13-1+0~20181207100540.13+stretch~1.gbpf57305


(Lukas Winkler) #2

Hi,

Thanks for sharing the URLs, this was much easier to solve this way.

If you open your browsers developer tools, you see that the tracking code tries to load https://server.hooghwinkel.com/matomo/piwik.js as you would expect.

But for a reason only your webserver config can tell you, your webserver doesn’t deliver the piwik.js file, but instead redirects to the homepage

curl -i https://server.hooghwinkel.com/matomo/piwik.js
HTTP/1.1 302 Found
Date: Mon, 10 Dec 2018 09:42:09 GMT
Server: Apache/2.4.25 (Debian)
Location: http://www.hocom-advies.nl/
Content-Length: 300
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://www.hocom-advies.nl/">here</a>.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at server.hooghwinkel.com Port 443</address>
</body></html>

:warning: There is another independent issue in your tracking code :warning:

You are using both the normal tracking code and the image tracking code which means that every page view will be tracked twice. You should put the image tracking code in a <noscript></noscript>, so that it only loads for people who have Javascript disabled and therefore can’t use the normal tracking code.


#3

@Lukas Thanks for the quick reply. I’m responsible for both the server config as well as for the site and matomo. I recently added an ssl certificate for https://hocom-advies. After that all the fun started :slight_smile:
So I guess the problem must be in one of the vhost (vhost-ssl) settings of hocom-advies or server.hooghwinkel.com ? Some rewriting is interfering but for now I have no clue what could be wrong.

The other issue you mention I am aware off. But that is for later to fix.


(Fabian Dellwing) #4

If you are able to, please share the whole vhost of server.hooghwinkel.com.


#5

Here are both the hocom-advies.nl and server.hooghwinkel vhosts pasted :

#vhost met rewrite naar https
<VirtualHost *:80>
DocumentRoot "/var/www/www.server.hooghwinkel.com/"
ServerName server.hooghwinkel.com
ServerAlias server.hooghwinkel.com  www.server.hooghwinkel.com  http://server.hooghwinkel.com http://www.server.hooghwinkel.com
<Directory "/var/www/www.server.hooghwinkel.com">
Options -Indexes
AllowOverride all
</Directory>
Redirect permanent / https://server.hooghwinkel.com
</VirtualHost>
 
And the vhost.conf-ssl:
 
<VirtualHost *:443>
DocumentRoot "/var/www/www.server.hooghwinkel.com/"
ServerName www.server.hooghwinkel.com
ServerAlias server.hooghwinkel.com  www.server.hooghwinkel.com http://www.server.hooghwinkel.com
<Directory "/var/www/www.server.hooghwinkel.com/">
Options -Indexes
AllowOverride all
</Directory>
SSLCertificateFile /etc/letsencrypt/live/server.hooghwinkel.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/server.hooghwinkel.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/server.hooghwinkel.com/chain.pem
</VirtualHost>
 
Vhost - HOCOMADVIES:
<VirtualHost *:80>
DocumentRoot "/var/www/www.hocom-advies.nl/www"
ServerName www.hocom-advies.nl
ServerAlias hocom-advies.nl  www.hocom-advies.nl http://www.hocom-advies.nl  hierbeginthet.nl www.hierbeginthet.nl
<Directory "/var/www/www.hocom-advies.nl/www">
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride all
</Directory>
Redirect permanent / https://hocom-advies.nl/
</VirtualHost>
 
And the Vhost-ssl config HOCOMADVIES
<VirtualHost *:443>
DocumentRoot "/var/www/www.hocom-advies.nl/www"
ServerName hocom-advies.nl
ServerAlias hocom-advies.nl www.hocom-advies.nl https://www.hocom-advies.nl hierbeginthet.nl www.hierbeginthet.nl
<Directory "/var/www/www.hocom-advies.nl/www">
Options -Indexes
AllowOverride all
</Directory>
SSLCertificateFile /etc/letsencrypt/live/hocom-advies.nl/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/hocom-advies.nl/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/hocom-advies.nl/chain.pem
</VirtualHost>

(Fabian Dellwing) #6

First of all:

Remove the http:// things from the ServerAlias, they are doing absolutely nothing for you.

Second:

I guess you did not modify the options-ssl-apache.conf file?

Third:

Do you have a default vhost and if yes, can you show it?


#7

@fdellwing this is the default.vhost.conf:
https://pastebin.com/pkMbuqEc
There is no default ssl.vhost

some other strange thing I experienced after adding the https:// hocom-advies.nl vhost was that before that I could access my servers ip address which than showed a html page as some basic page for domain-names registered but not in use for a website. Now, the server ip-address is also resolving to https://hocom-advies.nl ? So the error must be in that vhost I guess?

Where is the options-ssl.apache.conf located? I did not modify that.


(Fabian Dellwing) #8

/etc/letsencrypt/options-ssl-apache.conf

I currently do not see any flaw in your configs besides the ServerAlias.

But currently there is this redirection chain: http://server.hooghwinkel.com -> https://server.hooghwinkel.com -> http://www.hocom-advies.nl/ -> https://hocom-advies.nl/

The first and the last redirect are expected and present in the configs, the middle one…well… :question:


#9

I now found why the strange rewrite from server. to http://www.hocom-advies.nl/ happens :slight_smile:
There was an .htaccess file in place which redirects other visitors beside me (my ip address) towards the hocom-advies url.
So for now I disabled that rewrite. But this has been there for months. So that could not explain the problem not getting data in Matomo right?
So what’s next?


(Fabian Dellwing) #10

Well, it definitly was the reason why it did not work right now.

If you wanna protect your login mask against intruders (there is no real need for that), take a dive into Knowledge base - Matomo forums


#11

Ok, I will see what happens. But until now I do not see any real-time visitors or others appearing in my dashboard.


(Fabian Dellwing) #12

As far as I can see, it should now work. There are calls to piwik.php for tracking.


#13

I’m getting data again :slight_smile: thanks for the support. :slight_smile: