Skip to main content

Console commands

Custom dimensions

https://matomo.org/faq/how-to/faq_21121/

List info regarding existing custom dimensions

./console customdimensions:info

Add additional custom dimensions.

./console customdimensions:add-custom-dimension --scope=visit --count=10

Remove custom dimensions.

./console customdimensions:remove-custom-dimension --scope=visit --index=x

Re-generate tag manager containers

./console tagmanager:regenerate-released-containers

Run archive script (for alla websites)

./console core:archive --force-all-websites

Erase data

Example, erase all data between 220920 and 221114 for site id 3.

./console core:delete-logs-data --dates="2022-09-20 01:00:00,2022-11-15 01:00:00" --idsite=3 --no-interaction
./console core:invalidate-report-data --dates=2022-09-20,2022-11-15 --sites=3
./console core:archive --force-date-range=2022-09-20,2022-11-15 --force-idsites=3

Delete logs data

Time based on UTC.

Example, delete all data from 220920 00:00 (Swedish time) to midnight 221114:

./console core:delete-logs-data --dates="2022-09-20 01:00:00,2022-11-15 01:00:00" --idsite=3

More information available here: https://matomo.org/faq/how-to/faq_20184/

Erase old archived data

./console core:archive --force-all-websites --idsite=[one or many idsites with comma inbetween]
./console core:archive --force-idsites=[idsite] --force-date-range=[specifc date range]

Invalidate archived data

./console core:invalidate-report-data --dates=[specific date range with comma inbetween] --sites=[one or many idsites with comma inbetween]

Users

Reset password

./console user:reset-password --login="<super>" --new-password="<password>"

Create user

./console user:create --login="<super>" --email="<email>" --password="<super>" (--super)

Geo - update database

./console scheduled-tasks:run "Piwik\\Plugins\\GeoIp2\\GeoIP2AutoUpdater.update"

Utf8mb4 charset

Run the following command to convert tables to utf8mb4

./console core:convert-to-utf8mb4

E-mail test

Test that e-mail is working with the following command:

./console core:test-email d+test@whitespace.se

Limits of data rows

After the top 500 or top 1000 rows, Matomo automatically groups pages, keywords, websites, etc. under the label “Others”. We can change this in config.

./console config:set --section="General" --key="datatable_archiving_maximum_rows_actions" --value=<value>

Maximum number of rows for pages in categories (sub pages, when clicking on the + for a page category)

./console config:set --section="General" --key="datatable_archiving_maximum_rows_subtable_actions" --value=<value>

Maximum number of rows for any of the Events tables (Categories, Actions, Names)

./console config:set --section="General" --key="datatable_archiving_maximum_rows_events" --value=<value>

Maximum number of rows for sub-tables of the Events tables (eg. for the subtables Categories>Actions or Categories>Names)

./console config:set --section="General" --key="datatable_archiving_maximum_rows_subtable_events" --value=<value>

Maximum number of rows for the Site Search table

./console config:set --section="General" --key="datatable_archiving_maximum_rows_site_search" --value=<value>

Maximum number of rows for the User ID report

./console config:set --section="General" --key="datatable_archiving_maximum_rows_userid_users" --value=<value>

Activate plugins

./console plugin:activate <name>