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

Without the dashboard

The top slot of your browser can send requests to Tracking API & Reporting API
The command line of your browser can accept direct Matomo input (e.g. the PHP ./console command).
On this page are a variety of things you can do without ever touching the visual dashboard (Matomo GUI)

Examples of Matomo's database table matomo_archive_invalidations

11/4/2024

0 Comments

 
How does Matomo keep track of what to process?
The core:archive looks for invalidations in the database table called matomo_archive_invalidations.

Four sequential screenshots of the invalidations table in the MySQL database.
1. The table is empty becuase I did:
   mysql> TRUNCATE  matomo_archive_invalidations;
   mysql> SELECT count(*) FROM  matomo_archive_invalidations;
2. Then I told Matomo that all the reports are stale for today and yesterday.
This second screenshot is after this CLI command
   CLI: sudo su www-data -s /bin/bash -c  "php /var/www/littlefurnace.com/matomo/console core:invalidate-report-data --sites=1,2  --dates="2024-11-03",today --periods=day,week,month"
    mysql> SELECT count(*) FROM  matomo_archive_invalidations;
3. Then I ran the archiver, telling it to not calculate the archiving of any segments.
The syntax in Matomo for archiving WITHOUT doing segments is like this:
$ sudo su www-data -s /bin/bash -c  "php  -d memory_limit=2G   /var/www/littlefurnace.com/matomo/console core:archive --skip-all-segments --force-idsites=1,2"
4. The fourth screenshot is of the database after archiving the segments using the following command, similar to the command in 3:
  $ sudo su www-data -s /bin/bash -c  "php  -d memory_limit=2G   /var/www/littlefurnace.com/matomo/console core:archive  --force-idsites=1,2"


Picture
Picture
Picture
Picture

What happens in the matomo_archive_invalidations table when you invalidate?

When you do one simple command, invalidate a year, for one site (not any days nor months), what is created in the table is actually a series of rows, presumably each one a different recipe which needs to be performed on your one site, for the year.  Recall that Matomo builds the data of a YEAR by adding up the reports for the individual DAYS.

Run this in the CLI
sudo su www-data -s /bin/bash -c  "php /var/www/littlefurnace.com/matomo/console core:invalidate-report-data --sites=1  --periods=year --dates='2024-11-02','2024-11-02'"

You'll create these lines in the invalidations queue (which is stored in the db as matomo_archive_invalidations

Picture
0 Comments



Leave a Reply.

    Author

    Evan Genest

    Archives

    November 2024
    August 2024
    May 2024
    March 2024
    February 2024
    November 2023
    October 2023
    September 2023
    August 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