The general guide from Matomo:
https://matomo.org/guide/tracking-data/import-server-logs/ The importer will fail silently if you lack permissions. It's a read error. The following worked: sudo python3 /var/www/littlefurnace.com/matomo/misc/log-analytics/import_logs.py --url=https://littlefurnace.com/matomo --idsite=1 --recorders=4 --enable-http-errors --enable-http-redirects --enable-bots /var/log/apache2/access.log --token-auth=REDACTED --debug-tracker
0 Comments
Please note that the Matomo Docker images do not form part of Matomo's automated security assessments. They only do this for the Matomo codebase itself. To be secure:
Matomo does not provide hands-on, in-depth support for Docker but it is a popular way to deploy. The general concept is similar to a multi-server Matomo model, so these diagrams are useful: https://matomo.org/faq/on-premise/how-to-configure-matomo-for-high-availability-multi-server-environment/ Three ways to upgrade Matomo without losing data (this is for sites with more than 1M hits/month).
Two of these are described here https://matomo.org/faq/how-to-update/faq_20844/ Option 1 - Creating a copy/replica of the existing production environment with a test database The steps for this would be as follows:
This option has the benefit of being able to update the codebase without directly making changes to the production environment, but doesn't allow for 1:1 planning for any potential issues with the production database. Option 2 - Creating a copy/replica of the existing production environment including the Matomo database The steps for this would be as follows:
This option has the benefit of updating the codebase without impacting the production environment, planning for any specific issues that might arise from updating the production database and have mitigation strategies for that. It also allows for an accurate estimate of the required maintenance window for the production database update. This strategy does not allow for minimal downtime and tracking during the update would need to use either the Queued Tracking or Log Analytics method mentioned here: https://matomo.org/faq/how-to-update/faq_20844/ Option 3 - Creating a copy/replica of the existing production environment including the Matomo database and migrating to this replicated setup once updated. The steps for this would be similar to option 2 and are as follows:
This strategy allows for the most amount of planning and doesn't require specific timeframes to complete the update. Since we can backfill the data as much as is necessary using the Matomo web server access logs (These need to be enabled in the web server configuration). The update can happen while the existing production database is running and the switch can be made once this replicated setup is fully updated and ready. The backfilling of tracking data can also be tested while running in parallel to the existing production setup to check for any potential discrepancy in the replayed tracking data. Track 100% of your website traffic, without a consent banner, including "cookieless Matomo"2/17/2024 Here are all four ways to track in Matomo without a consent banner: https://matomo.org/faq/new-to-piwik/is-there-a-cookie-less-alternative-to-google-analytics/
============ How to accomplish your goal of 100%? Because Matomo has been developing in parallel with GA since 2008, we have had time to create four completely separate solutions to this objective:
Matomo is a classic LAMP stack in most cases: Apache (or similar) web server creating the APIs, running in Linux. Windows works too - but the documentation defaults to giving Linux syntax. PHP language in the backend and persistent data with MySQL database (or similar: MariaDB, AWS MySQL, Azure Windows MySQL all work).
Most of your Matomo deployment is just generic code: you could erase it and lose nothing. The precious, precious data, lives entirely in the SQL database. This is great because it's portable. And because MySQL database is mature tech, there are tons of experienced admins and tons of online documentation. Here are some official migration guides: https://matomo.org/subcategory/migrate/ If you move your deployment, don't forget to also move the settings files. These are a small flat file, less than 1MB in many cases. But that's it. You can discard all of the Matomo PHP/Python/JS code and redownload from Matomo any time you need it. A common use case is to connect Matomo to other software.
A quick overview first. Data flows out of Matomo by three possible routes, depending on the destination. (1) Some software, such as Looker Studio, ingests data from a spreadsheet which in turn can be sync'd to Matomo. (2) Other software, gets data by making requests to the API. (3) A third option to send the data is to make queries directly to the SQL database of Matomo. Read more about this overview here: https://matomo.org/guide/apis/export-data-to-other-tools/ The API is a good way - maybe the best. It's secure, it's maintainable, it has a nearly 1:1 correspondance with the widgets/dashboards/reports already visible in the Matomo interface. How to get started with the API: 1) The dashboard of your Matomo instance can build examples of many of the API calls. I usually use these as a stub or starting point. Go to Dashboard >> ⚙️ >> Platform >> API. Then find a method and click on JSON, XML, CSV, et al The most important API method for your purpose will probably be "Module Live" (scroll down on the page; there's hundreds of API calls to scroll through!) 2) Add the further details of the call using the syntax guide: https://developer.matomo.org/api-reference/reporting-api 3) Go to your third-party software settings and add the API call. You can follow Part 1, here, generally https://matomo.org/faq/how-to/faq_24536/ And the 3rd party software docs will help. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2024
Categories |