Manually updating segments?

I had to fix some values of custom variables in the _log_visit -table directly in MySql. Now the old values still show in the segments. How do I force update for them so that my dashboard will show only updated data?


It seems to me that what you changed are the “raw” visit data, but Matomo periodically aggregates these data into “archive…” tables and what you see in the UI are data from those archives.

So IF THIS IS CORRECT, then to update the archives, you need to Invalidate them - either using the Invalidate plugin or using the console. In the next processing step, Matomo will regenerate the archives from the logs again. (Depending on the amount of data, it might take a while.)

Just to be on the safe side, backup your data first :slight_smile:

1 Like

Thanks. This is exactly what I was looking for - I just assumed that the archives would be periodically updated automatically. Obviously I was wrong here. But if I invalidate them, will they then be updated automatically, or do I need to take further action to have them re-installed?

1 Like

Most probably it will be automatically regenerated. As to when it happens depends on your settings.

As far as I understand it: It will be either when your periodic update executes using Cron (once per hour?, once per day?) or when you open the browser and try to view invalidated data.

You can also trigger the update manually by going into your Matomo directory (perhaps first login to your server using SSH) and running “./console core:archive” … this again kinda depends on your installation and what exactly are you, as a user, permitted to do.

A follow-up. The variable values are now invalidated and the reports re-generated. Data shows as it should. Except:

When I look at the data in Visitors-Custom variables widget, the table still lists those values that I have removed from the data. The widget correctly shows “no data” (as a dash character), but the labels persist. Is there a way I could remove these outdated labels from the widget view?