-
@humptydumpty Let me try to setup a fresh matomo+wp instance and try to check might be going wrong.
-
@girish Sounds good but it's working now. It seems my IP is being ignored even though no setting is active that would exclude it. I've checked the Matomo dashboard and the WP-Piwik settings. After using other devices and connecting each to a different VPN server so the IP's aren't the same, the hits started showing up for all sites in Matomo dashbboard and a few minutes later, in the WP dashboard too.
-
@humptydumpty Oh maybe that is the bug? That the geolite db is out of date or something? I just pushed a new matomo package with updates to the geolite db.
-
@humptydumpty Guess what I faced exactly the same behavior as you did (I didn't test with WP though). Simply, matomo was just not collecting data. I even tested from my mobile network and that didn't work either.
After some debugging, I found that the "common" thing is that I am using firefox (on linux desktop and android). I tried with chrome and lo it starts working! That led me down to investigate some privacy setting. I found that Firefox sends the DNT (do not track) header by default and matomo respects this header (by default). If you tell matomo to ignore the DNT header, it works. You can do this in Privacy -> Users opt-out and then it starts registering firefox. Obviously, it's probably a good idea to keep this turned on but atleast I found this is the reason it wasn't working.
-
To conclude this:
- Add the following to
config/config.ini.php
and restart matomo:
[Tracker] debug = 1
- Then, add following line to your site:
<img src="https://matomo.example.com/piwik.php?idsite=1&rec=1" style="border:0;" alt="" />
- Then, check the response for piwik.php in devtool network view.
[2020-11-16 23:53:31] piwik.DEBUG: Debug enabled - Input parameters: array ( 'idsite' => '1', 'rec' => '1', ) {"params":"array (\n 'idsite' => '1',\n 'rec' => '1',\n)"} {"class":"Piwik\\Tracker","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Current datetime: 2020-11-16 23:53:31 {"date":"2020-11-16 23:53:31"} {"class":"Piwik\\Tracker","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\CoreHome\Tracker\VisitRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\IntranetMeasurable\Tracker\RequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\Actions\Tracker\ActionsRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\Goals\Tracker\GoalsRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\Ecommerce\Tracker\EcommerceRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\SitesManager\Tracker\SitesManagerRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\CustomVariables\Tracker\CustomVariablesRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\PrivacyManager\Tracker\RequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\Heartbeat\Tracker\PingRequestProcessor::manipulateRequest()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Executing Piwik\Plugins\CoreHome\Tracker\VisitRequestProcessor::processRequestParams()... [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: DoNotTrack header found! [] {"class":"PrivacyManager","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Visitor excluded. [] {"class":"CoreHome","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: -> aborting due to processRequestParams method [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: -> Scheduled tasks not running in Tracker: Browser archiving is disabled. [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: Nothing to notice => default behaviour [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: End of the page. [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: array ( 'MATOMO_SESSID' => '31047d5jt9einvp951h79t0pnm', ) [] {"class":"Piwik\\Common","request_id":"9757e"} [2020-11-16 23:53:31] piwik.DEBUG: [] {"class":"Piwik\\Common","request_id":"9757e"}
It says clearly it gets ignored because of do not track header.
- Add the following to
-
@girish That did it! Partially at least. I have more "privacy" plugins. It's working now if I open a private window since it doesn't load the other plugins. It's great to know it's not a server/app issue at least. Here's the full list of firefox plugins I'm running. One (or more) of them is still causing issues for Matomo.
- Decentraleyes
- Facebook Container
- Firefox Multi-Account Containers
- Privacy Badger
- Privacy Pass
- True Sight
- uBlock Origin
-
@humptydumpty Nice, happy to recommend adding LocalCDN.org to that if you're interested.
-
@humptydumpty And uBlock Origin doesn't block Matomo but Firefox Privacy settings certainly do.
-
@marcusquinn I think Decentraleyes does the same thing. Is it the case?
-
@humptydumpty Sure, LocalCDN is just a more maintained fork as I understand it.
-
@marcusquinn The funny thing about that is that I didn't believe the Firefox settings actually worked lol.. more like they wouldn't be honored, especially by closed source apps.
Edit: @marcusquinn In that case, I'll start using it instead of Decentraleyes.