Data Whimsy
  • Home
  • What is Matomo
  • Contact
  • Custom Reports
  • Connect Matomo to other software
  • CLI API etc
  • Matomo Tag Manager Simple Guide
  • Lyn Only
  • Troubleshooting + Deploying Matomo
  • Weird Data
  • Why is data in Matomo giving different numbers than Google Analytics
  • The Dashboard
  • Moving the Data
  • Book Club Forum

Beginner Guide to Troubleshooting Matomo

11/24/2023

1 Comment

 
If you don't think data is arriving in your Matomo dashboard, here are three sequential types of troubleshooting:
1) Type 1: Test your website in the browser. Load some specific pages you are monitoring into Firefox, Chrome, or similar. Watch browser >> developer tools >> network tab. Confirm that a tracking signal goes to Matomo.
2) Type 2: As you navigate your website, watch in the Matomo dashboard: Matomo >> Visitors >> Visits log. This is the raw, unenriched, unmanipulated data. Confirm that all of your website traffic arrives there.
3) Type 3: If everything looks good in 1 and , 2, now for your troubleshooting, check the numbers in the rest of Matomo (this is the enriched, manipulated data, after matomo's backend php modifies it). Look especially at matomo >> Behavior >> Pages maybe.
Picture

Type 1: Test your website in the browser.

The Matomo pageview event can be manually observed in your browser devtools.

In the case above we have configured a Javascript tracker on our website (pikl.us website) to monitor pageviews. The deluxe twist is we are sending the pageview to two Matomo servers. We set this up using the instructions here: https://matomo.org/faq/how-to/how-do-i-send-tracking-requests-to-two-or-more-matomo-servers/

Since it is easy (and catastrophic to data) to miss a pageview event, we want to confirm that we set it up correctly. (It's a common mistake to set up two servers and later discover that the data is uneven because you are only sending to the most recently set server.) Let's troubleshoot this in Developer Tools in the browser.

To confirm the pageviews are actually happening, do the following:
  1. Open up devtools in your browser. Go to browser >> other tools >> developer tools >> network tab
  2. Enter the URL of your website you want to monitor
  3. Find a pair of requests. They will likely be POST http requests and they will have no payload, hence the size will be 0 kilobytes.
  4. It's easy to see the request(s) by filtering for .php extension in the filter bar.
  5. Success! In the screenshot above you can see that we have a pair of POST requests going to our endpoints of littlefurnace.com/matomo/matomo.php and tatll.matomo.cloud/matomo.php.  The hypertext transfer protocol content of the request is shown in the right margin of the devtools window

In my case, the POST request contains the following:
Picture
https://tatll.matomo.cloud/matomo.php?action_name=pikL&
idsite=6&
rec=1&
r=333268&
h=9&
m=13&
s=44&
url=https://pikl.us/linksPage.php&
_id=675de8e438add64b&
_idn=0&
send_image=0&
_refts=0&
pdf=1&
qt=0&
realp=0&
wma=0&
fla=0&
java=0&
ag=0&
cookie=1&
res=2560x1080&
pv_id=U80TLm&
pf_net=292&
pf_srv=72&
pf_tfr=0&
uadata={}


If you would like to learn more about the parameters in the request, see the Matomo parameters documentation here:
https://developer.matomo.org/api-reference/tracking-api

TODO:
Specific examples of troubleshooting, Type 2 and Type 3, will be added here in the future.
1 Comment

Error: Memory Exhausted

11/7/2023

0 Comments

 
Typical Error Message:
mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 94896128) (tried to allocate 35651616 bytes) in /var/www/littlefurnace.com/matomo/vendor/pear/archive_tar/Archive/Tar.php on line 1907

Remedy:
#1
Find where the file is for your PHP settings. The location is variable. PHP language is installed in the same machine where your web server for Matomo is running.  Look up how to run phpinfo(). This pink and blue page will show the location of your PHP settings:

Picture
#2 Now look inside that file. Find the memory setting. Change it to something like memory_limit = 2G

$ head /etc/php/8.2/fpm/php.ini

$ grep memory /etc/php/8.2/fpm/php.ini
$ sudo nano /etc/php/8.2/fpm/php.ini
$ sudo systemctl restart apache2

Picture
0 Comments

    Troubleshooting + Deploying Matomo

    Archives

    December 2024
    July 2024
    April 2024
    March 2024
    February 2024
    November 2023
    October 2023

    Categories

    All

Powered by Create your own unique website with customizable templates.
  • Home
  • What is Matomo
  • Contact
  • Custom Reports
  • Connect Matomo to other software
  • CLI API etc
  • Matomo Tag Manager Simple Guide
  • Lyn Only
  • Troubleshooting + Deploying Matomo
  • Weird Data
  • Why is data in Matomo giving different numbers than Google Analytics
  • The Dashboard
  • Moving the Data
  • Book Club Forum