[Solved] INSERTS into matomo_session BUT NOT matomo_log_visits therefore no visits tracked

I recently installed the latest Matomo version.
Matomo version: 3.11.0
MySQL version: 5.7.27-0ubuntu0.18.04.1-log
PHP version: 7.2.19-0ubuntu0.18.04.1
Using Nginx-latest

My problem is the following:
I can’t see any visitors tracked. However, I see matomo_session being created.

mysql> select count(*) from matomo_log_visit;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from matomo_session;
+----------+
| count(*) |
+----------+
|       29 |
+----------+
1 row in set (0.00 sec)

I have verified the following:

  • tracking code is on the website.
  • request to matomo.(php|js) is happening with 200 response.
  • db queries are making it to the mysql db.

Here are some logs from nginx…

xxxxxxxxx - - [30/Jul/2019:14:41:39 +0000] "GET /index.php?module=Installation&action=getSystemCheck&idSite=1&period=day&date=yesterday&showtitle=1&random=935 HTTP/1.1" 200 386 "https://analytics.a-site.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"
xxxxxxxxx - - [30/Jul/2019:14:41:39 +0000] "GET /index.php?module=RssWidget&action=rssPiwik&idSite=1&period=day&date=yesterday&showtitle=1&random=7747 HTTP/1.1" 200 887 "https://analytics.a-site.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"
xxxxxxxxx - - [30/Jul/2019:14:41:39 +0000] "GET /index.php?module=Marketplace&action=getNewPlugins&isAdminPage=1&idSite=1&period=day&date=yesterday&showtitle=1&random=8786 HTTP/1.1" 200 861 "https://analytics.a-site.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"
xxxxxxxxx - - [30/Jul/2019:14:43:17 +0000] "GET /matomo.js HTTP/1.1" 200 22740 "https://b-site.com/" "Mozilla/5.0 (Linux; Android 7.0; FRD-L04) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 Mobile Safari/537.36"
xxxxxxxxx - - [30/Jul/2019:14:43:19 +0000] "GET /matomo.php?action_name=sss&idsite=1&rec=1&r=935659&h=9&m=43&s=18&url=https%3A%2F%2Fb-stie.com%2F&_id=fad29bff0addd9df&_idts=1564497798&_idvc=1&_idn=0&_refts=0&_viewts=1564497798&send_image=1&cookie=1&res=360x640&gt_ms=67&pv_id=pwSLge HTTP/1.1" 200 54 "https://b-site.com/" "Mozilla/5.0 (Linux; Android 7.0; FRD-L04) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 Mobile Safari/537.36"
xxxxxxxxx - - [30/Jul/2019:14:43:20 +0000] "GET /matomo.php?action_name=sss&idsite=1&rec=1&r=297690&h=9&m=43&s=19&url=https%3A%2F%2Fa-stie.com%2F&_id=fad29bff0addd9df&_idts=1564497798&_idvc=1&_idn=0&_refts=0&_viewts=1564497798&send_image=1&cookie=1&res=360x640&gt_ms=183&pv_id=T10uDc HTTP/1.1" 200 54 "https://b-site.com/" "Mozilla/5.0 (Linux; Android 7.0; FRD-L04) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 Mobile Safari/537.36"

Any help would be greatly appreciated.
Thanks,
Greg

Hi,

The easiest way to debug this is temporarily enabling debugging here: Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

Then the matomo.php request will return a verbose log when you check it in the network tab of you browsers developer tools.

But I guess maybe you have DoNotTrack enabled which causes the requests to be ignored.

Thanks Lukas!

It was the DoNotTrack setting I had enabled in my browser along with the Support DoNotTracking setting in /index.php?module=PrivacyManager&action=usersOptOut&idSite=1

1 Like