Matomo
There is excellent open source documentation for Matomo (Piwik):
https://matomo.org/faq/reports/tour-of-matomo-overview-of-the-reporting-interface/
If you have any problems using the Matomo web analytics tool, have questions about other functions or need support with the integration into your Fiona website, please feel free to contact us.
How can I use Matomo at Universität Hamburg?
Please fill out our application form. You will then receive your access data and further information.
How can I track my FIONA website in Matomo?
Once you have completed and submitted the user request, we will prepare log files from your website for log file analysis in Matomo and then notify you. You will be able to view them in the Matomo portal from the following day.
How can I get Matomo to track my Blog in the UHH Blog Farm?
1. Request Matomo access
- See Matomo user request
2. Setup in the blog farm
We set up your log files for log file analysis in Matomo for your blog in the blog farm and respond to your request. You will find your tracking data in the Matomo portal from the following day.
3. Data protection
If Matomo is used in WP, it must be described in the blog's privacy policy, see DSE template at https://www.blogs.uni-hamburg.de/service/datenschutz/dsgvo-basisvorlage-blog.html
From July 17, 2025, blog tracking in the blog farm will use the LogFileAnalytics variant (without cookies and without JS code), so according to the latest assessment by the Federal Data Protection Commissioner, no consent banner is required.
If you need a cookie banner for other features such as opt-ins, Facebook Pixel, Google AdSense, and for reloading YouTube videos and iframes, we recommend the Borlabs Cookie plugin.
Data protection: How is the data stored?
The tracking data is stored anonymously in a database in accordance with data protection regulations:
- The last two octets of IP addresses are discarded.
- No tracking cookies are set.
- The tracking data is deleted after two years.
It is possible to integrate Matomo into your website without JS code if you use the Matomo log file analytics method. According to the latest assessment by the Federal Data Protection Commissioner, no consent banner is required in this case. The procedure is set up automatically for websites using Matomo in Fiona, in the UHH blog farm, and on the RRZ web app server. For websites on other servers, it would have to be set up by the server administrators; see the next FAQ question.
How do I set up Matomo Logfile Analytics on my own server?
It is possible to set up Matomo for your website without JS code if you use the Matomo log file analysis method. According to the latest assessment by the Federal Data Protection Commissioner, no consent banner is required in this case. For websites using Matomo in Fiona, in the UHH blog farm, and on the RRZ web app server, the method is set up automatically. For websites on other servers, it would have to be set up by the server administrators, see https://matomo.org/guide/tracking-data/import-server-logs
If you want to use Matomo LogAnalytics, proceed as follows:
- Download Scrypt from github https://github.com/matomo-org/matomo-log-analytics/ to your server, e.g. under /opt/import_logs.py
- In Matomo, navigate to the “gear” icon for “Administration” (top right), select the ‘Security’ tab on the left in the following window, then click on “Generate new token” and copy the newly generated value. Please do NOT set the option “allow only secure requests”, as it does not work with the latest Matomo version. To do this, you should have admin rights for your site in Matomo. If you do not have these rights yet, please contact the RRZ ServiceLine.
- Store your Matomo token and then call the scrypt as follows (if you have apache2 as your web server):
/usr/bin/python3 /opt/import_logs.py --url=https://matomo.uni-hamburg.de/\
(Please adjust your Matomo site ID, your token, the path to the Python script and to the access log file of your site, which has been rotated once and is no longer being written to.)
--idsite=$NRYOURMATOMOSITE --token-auth=$YOURTOKEN\
--log-format-name common /var/log/apache2/$YOURSITE-access_log.1 - The script should then run as a cron job, e.g. once a night.
Please note:
- By default, the logs contain full IP addresses and login IDs. Matomo discards the first 2 octets of the IP addresses, so no action is required. For IDs, you should adjust the log file format so that they are not sent to the Matomo server, e.g. replace the user variable %u with a placeholder:
LogFormat "%h %l NOUSER %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" common
- When switching to LogFile Analytics, the number of recorded accesses changes significantly, see info on this.
How can I export statistics for a specific period in Excel?
First, set the period/date for which the statistics are to be collected.
In the Piwik web interface, icons for editing and exporting data appear at the bottom left edge of each widget when you hover over it with the mouse. Select the appropriate format and export the data.
How can I create statistics for a specific sub-area?
This functionality is called “Segment”. In the Matomo web interface, you can create, edit or delete a segment under “ALL VISITS”:
Click on “ADD NEW SEGMENT” / “NEUES SEGMENT HINZUFÜGEN”. A form with various selection fields opens:
Unfortunately, this form is rather confusing. Give the segment a name. Then select the appropriate one from the numerous options. As a rule, you want to collect everything starting from a subfolder of a website that begins with a certain URL. This is selected at the top of the screen. To the right of “Starts with”, enter the URL from which the segment should apply, e.g. https://www.rrz.uni-hamburg.de/services/weitere/www-dienste. Everything that starts with this URL is then collected in the segment (this information can still be found in the overview for the entire tracked website if it meets the criteria set there).
You can then enter further conditions if necessary.
The data for the segment is not created retrospectively, but only from the time the segment is set up.
Why can't I find any data for a page?
The number of hits for subpages is displayed in descending order in a directory. However, the number of subpages displayed is limited. So if you are looking for a page and cannot find it, there are probably more pages in the directory that have higher hit rates than the one you are looking for. At the end of the list, there is always an entry labeled “more” that summarizes everything that cannot be displayed individually, including the missing page.
Furthermore, direct access to documents (PDF files, images, Office documents, etc.) cannot be tracked because they cannot be provided with the tracking code for Matomo. An exception to this are PDF files that are managed by the central WCMS Fiona. Direct access to PDF files in the Fiona system is recorded (if the entire website is tracked by Matomo). However, if the PDF file has been stored on the upload server because it exceeds the maximum size in Fiona, Matomo cannot count it.