Okay, and with this, it is three o'clock, and I would like to introduce three people
for the next presentation, namely, Davide Porovesio, Pierluigi Tassi, and Claudio Schelleheim.
And in their talk, they will give an overview of how web analytics with Matomo are used
in the public section in Italy, including a case study of the long-term usage of Matomo.
So whenever you're ready, please start.
Hello to everybody.
My name is Claudio Schelleheim, as I said, and I'm responsible for the web development
service in the agency for Digital Italy.
Today I want to present you our solution for monitoring website statistics of public administration
in Italy.
And, of course, we used Matomo, and I explained in this very short presentation why we decided
to implement a national statistical platform.
From a legal point of view, in Italy we have a core legal context, quite articulated, quite
complex, which is called Code of Digital Administration.
In Article 7, it says that public administration shall publish on their website data on user
statistics.
In the Code of Digital Administration gives you rules about the digital issue for the
public and private entities, and it's a rule, it's a legal framework that must be followed.
And it says that public administration should allow users to express their satisfaction
on the service quality in terms of usability, accessibility, and timeliness.
So public administration should also publish, as I said, on their website the resulting
data, including analytics.
In Article 53, I don't want to bother you with many legislative aspects, but just to
say that this is something that is required by the law, this code says that the Internet
side of public administration should respect the principle of accessibility, usability,
as stated in specific government guidelines.
So public administration should create a website that respects this principle, and about usability,
findability, completeness of information, clarity of language, reliability, ease of
consultation, homogeneity, and interoperability.
Well, all this stuff, as we know, must be, this level of quality can be reached only
by even, well, by monitoring the use of websites or digital services by the users.
So of course, there are many, many other ways of projecting good web services, but now just
focus on this aspect.
A web agency for digitality wrote these guidelines while we define the modalities for the creation
and modification of Internet websites of public administrations.
These guidelines as well are something that must be followed.
It's not something like, can I say, nice to have a feature, but it's something that public
administration should respect.
And in these guidelines, we say that, again, the statistics should appear on each website.
The data, this is very important.
In this case, data, huge statistics, data remains inside the public administration with
the solution we defined.
And what is this solution, the technical solution?
We developed a national platform, which is called Web Analytics Italia, and it's an open
source solution for collecting, analyzing, and sharing traffic and user behavior data
dedicated to Italian public administration websites.
So in order to analyze and improve the user experience, we decided to develop this national
platform.
And this is the very first time in Italy for the government that we have such a tool, such
as a platform, and already many, many administrations have joined these solutions.
And many more are going to join this platform by next year.
And okay.
Going out of Italy, we connected this platform, this solution with the regulation of the single
digital gateway.
The regulation 2018, 1724, establishes a single digital gateway at the Europe level to provide
access to information, to procedures, and to assistance and problem-solving services.
The website addresses Europe, okay, you can see it on my side.
So what do we have to do with Web Analytics Italia based on Matomo and this Europe-Europe
platform?
Well, this single digital gateway has thousands and thousands of links to national web pages,
which contains lots of information, specific information.
These statistics about these web pages at national level must be sent to European Commission.
And this is written clearly stated in the regulation.
So national authorities shall ensure that statistics are collected in relation to users'
visits on the gateway and on the web page to which the gateway links in a way that guarantees
anonymity of the users in order to improve the functionality of the gateway.
Well, we implemented, we connected this national solution with the Europe-Europe single digital
gateway.
And in this way, we avoid, as many other member states are doing now, we avoid to ask to the
single administration to send a file like on Excel or something, stuff like that, to
the European Commission about statistics.
What kind of information we gather?
Number of visits, very, very basic information, but useful.
Number of visits, number of unique visits per web page, countries from which the user
are visiting the web page, type of devices used, and the time spent on page.
Very basic ones, but we have set up an automated way to send this information regularly to
the European Commission.
Nevertheless, this is the way the web analytics connect with other nodes of the Europe framework.
And from until now, the statistics are related to web pages only, and from 2023, these statistics
will be related to services online, which will be made available by the end of 2023.
My presentation finished here, I thank you very much for your kind attention.
I give the floor to Davide Porovecchio.
Thank you, Claudio.
I switch to my presentation, here we are.
Well, good afternoon.
My name is Davide Porovecchio, I'm the lead developer of Web Analytics Italia, the Italian
national platform for web analytics in the public sector.
WAI, pronounced Y, is the short name we use for Web Analytics Italia.
Well, why am I talking about Web Analytics Italia?
It is the project, now the platform, that brought us in-depth knowledge of Matomo.
WAI is evolving, of course, and follow the evolution of Matomo as well.
For example, one of the next steps in our roadmap will be to upgrade to version 4 of
Matomo.
Three main points about WAI.
The first, as established by the Italian law, the collection of statistical data is mandatory
for public bodies.
The use of WAI, however, is not mandatory, but recommended, because a central collection
point has many advantages, as we'll discuss in a moment.
WAI, third point, is connected to two other national platforms.
One is IndicePia, which is the directory of all the public administration, and the other
one is Speed, the Italian digital identity system.
When we started designing Web Analytics Italia, Matomo was the natural choice, because, as
you already know, it is completely open source, can be extended with custom plugin and configured
according to specific needs.
In addition to all this consideration, Italian law requires public administration to use
open source solutions when available, so we had no other choice than Matomo.
The possibility to collect data in one central point was a strategic decision to allow national
analysis and to address certain processes, such as the updating of guidelines for the
design of public websites, as Claudio told before me.
Now that the platform is quite stable, even if still in beta, we are planning an extensive
analysis of the data collected to extract valuable information about the interaction
of Italian citizens with public administration websites and, of course, the quality of the
websites.
Most of the administrations using Web Analytics Italia to monitor the traffic of their websites
are small municipalities or schools.
The ease of use and availability of an institutional solution allowed us to bring this organization
on board with minimal effort.
This is a first step toward our goal in the short term, as we wanted to spread as much
as possible the diffusion of Web Analytics among Italian public administration.
Okay, GDPR.
It can be a concern, we know, especially for small organizations.
The recent CNIL recommendation has confirmed that our choice to use Matomo was the right
one.
The guidelines of the Italian Data Protection Authority also point out that if we use Matomo
with the proper configuration that anonymizes personal data, we can collect statistics without
requiring explicit user consent.
As you can see in this simple diagram, so we are switching to explain, I'm going to
discuss now how we use Matomo, well, the discussion until now was about why we use Matomo.
Well, as you can see in this simple diagram, our users interact with why, front-end, for
logging in and for websites and user management, but they eventually switch to Matomo directly
when they need to view dashboards.
Why interacts with Matomo via API to perform the task requested by the user, and this interaction
happens in the back-end.
The tracking side is completely managed by Matomo with a configuration that I will discuss
in a moment.
This is the onboarding process for Italian public administration.
Well, after logging in, the user selects an administration and the corresponding URL is
retrieved from IndicePA, the directory of Italian administration.
At this point, why creates a new website in Matomo and provides the tracking code to the
user, so it can be included in the source code of the specific website.
Only after the visit starts to be tracked, why we create a new account in Matomo, thus
allowing access to the dashboard for the user.
With this pattern, we can be fairly sure that the user has permission to modify the code
of the institutional website listed in IndicePA for the selected administration.
Single Digital Gateway was described by Claudio some minutes ago, and is a regulation of the
European Commission that states, among other things, that each member state should collect
statistics on visit to the pages that are part of the Your Europe network.
Your Europe is a portal for European citizens looking for information rights, rules and
procedures for their personal and professional activities within the European Union.
The regulation requires that statistics for each page are transmitted using a country
device matrix.
Thanks to Matomo, we are able to easily build a system based on creating a segment for each
URL device pair and then querying the API with the userCountry.getCountry method for
each segment.
The resulting data is then structured in format required and automatically sent to the servers
of the European Commission.
Well, our architecture of Web Analytics Italia is hosted within a cloud service provider
that is made available to the Italian public administration.
The Y platform is based on IS type services.
Within our structure, we have installed a Kubernetes cluster that we use to orchestrate
the different containers that make up the whole system.
The only element outside of the Kubernetes cluster is the DBMS, which is installed on
a dedicated virtual machine for performance reasons.
For the portal component, which evolves faster than the other components, we have activated
the continuous integration, continuous deployment system that allows us to stay up to date with
the code in our GitHub repository.
In the next slide, I'm going to discuss in more detail the different Matomo containers
you can see now in this diagram.
We have four different types of Matomo containers.
Obviously, we use Qt tracking plugin.
So the first one is the ingestion container, which only expose the Matomo dot PHP endpoint
to the outside world and collect data and then queue them inside the Redis component.
The workers containers not exposed to the outside world, which dequeue the data from
Redis and load them into the database.
Then the third kind of container is the web container and is it exposed to the outside,
but only accessible by authenticated users, basically those coming from the web portal.
And it's for dashboards and reporting in general.
The last one is the API container, which at the moment only allow the visualization of
widgets, but with some limitation that I will discuss in a moment.
Okay about providing widgets to authorize the organization.
In order to provide our users with the possibility of displaying widgets on their website without
at the same time allowing the widgets to be included in any other website.
We have adopted the two tire solution on the web server using a specific script.
We add in the response to a request for a widget, a content security policy header with
the value frame ancestors and the URL corresponding in Matomo to the site ID in the request.
So the browser will show the frame only if embedded in the specified URL.
In Matomo, this is the second tire, we then use a custom plugin that rejects all requests
that do not contain the module equal widgetized parameter in the query string.
To avoid rejecting valid requests coming from inside the widgetized frame, the plugin let
them pass if they contain the string module equal widgetized inside the refer Http header.
Some performance metrics, well at Web Analytics Italy, we now have 677 tracking websites.
These websites belong to 590 public administrations and considering that in Italy we have about
20,000 different administrations, we are still far from good coverage, but the project has
already been quite successful and is growing fast.
At the moment we are getting about 50 million visits per month for a total of about 140
million page views.
The incoming traffic to the ingestion component averages something like 200 transactions per
second with peaks of up to 350 transactions per second.
Our keeping job is currently our least performing component because it takes almost 12 hours
to complete.
Bear in mind, however, that 590 roll ups, one for each administration, must be added
to the 677 websites, so we have more than 1,300 websites to process in their keeping
job.
Well, this finishes my presentation.
I want to thank everyone for listening.
All of what I've described is public and open source.
Our two main repositories are on github.com, and the other one is the same but has the
final part, wai-infrastructure.
Now I leave the floor to Pierluigi Tassi from Emilia Romagna region who will discuss about
another experience with Matuomo in the Italian public sector.
Thank you.
Sorry.
Hello, everybody.
Thank you.
Thank you, Davide, for explaining your project.
And thank you for joining because to explain to all the audience the big project you are
doing for the entire Italian public administration.
I'm speaking from Bologna, where you're situated in the region Emilia Romagna that is a smaller
administration, a smaller area of administration.
And the region is situated in the northern area of Italy, and it's counting four million
and a half residents in an area, an important area.
It's about 22 kilometers big.
And it's one of the most developed regions in Italy, and it's a choice for others and
a kind of light on administration of other regions.
Our area is very important for economic growth and industrial growth and tourism.
So we have a lot of products to eat, and you know Italians are very, very careful about
food.
So this is a big amount of food.
But also it's a very good area of industrial growing about motorsports.
Since ages, since tens of years, we developed a lot of very informed and very famous examples
of very good industrial products.
Because of this, the administration of the region must be aware, like the private sector,
and so the administration must accomplish their business.
It's a very hard duty because companies are always asking for good results.
For this, because of this, we have started doing analytics a lot of time ago.
It's more than time ago, 10 years ago.
And nearly since 2013, we started using Pwik, now called Matomo.
And the question was providing the privacy for the users.
Just that.
The only different product we can use was the Google Analytics, but we were not happy
with it because if you follow the previous talk, it was explained that free services
from private companies are always expensive in terms of privacy, it's a privacy cost.
So in 2013, we migrated our system from a barely logs analytic measurement to a real
web analytics software, because Pwik at that time was already giving a better amount of
data, a better amount of data, because of its scripts, because it was open source, a
very cost stable.
That happened before the JDPR rules that come in 2018.
And so we were already sensitive about this kind of problem of the privacy.
And our database size is now about 100 gigabytes.
And the most of the data is the report tables we are collecting since the start.
We have a lot of data we collected since 2013.
During the last two years, all the world had an emergency problem with the global, the
problem of the social problem with the virus.
And we started from a situation we can see here in the starting point where all the visits
to our website were about sleeping, about like sleeping, but they weren't really sleeping.
This is what our bigger amount of visits about this event was called the regional election
day that happened in the middle of January of 2020.
And then we had the problem with the emerging problem with the national security and the
health of the people.
At this time, Italy was the first country in Europe hit by the health problem.
And Emilia-Romagna was one of the regions first hit.
And so this was the amount of data we collected by people visiting our website looking for
the source of the official information for their life.
And this amount of data was also growing in the months later.
And then we expected doubled the traffic on our websites during 2020 and during this year
and this is not yet ended.
And so I think we are going to get the same level of visitors.
You see, you can see that the level it's really doubled in these two years.
And that's because people was looking for information about their health.
And also they discovered that our website is, all the websites we have are filled the
body a lot of useful information.
They weren't where I forgot to say, sorry, sorry for messing up with the slides.
I'm very sorry.
During that time, I was watching the analytics and I was careful about this small live recorder,
visit recorder and it was like this meme, I was watching these numbers going on.
This is now our installation.
Our installation is based on two virtual machine who are behind there under load balancer.
And we run the cron jobs for making reports every two hours.
Every two hours we have a cron job.
And this is the workload of the two instances.
The blue line is the memory amount used by Matomo and the red line is the CPU load.
This is smaller than the past because of the PHP 7 upgrade.
And this wave is the average request per second.
This situation is not really optimized as you've seen.
You can run Matomo on containers and I think it's the best solution to do it.
Because you can go with a cheaper configuration and spend less than needed.
This is needed because we are in a situation where we are not aware how much spikes we
can afford.
But this configuration was enough to enjoy this roller coaster mountains.
So let's go on the plugin development.
We are contributing to Matomo and for the audience for more than five years.
It's nearly 10 years long we are doing good with Matomo and the community.
So you can see me sometimes in the forums helping and chatting with people.
And during this time we managed to public two plugins.
One of them is a plugin that makes a measurement of people coming from intranet.
Your internal location is pretty configurable by the console, the administration console.
And you can choose your sectors, your addresses and by simple digiting regular expression
you can get this report.
This is important because our internal colleagues wanted to make a measurement of internal audience
and external audience on the websites.
I forgot to say we are measuring more than 150 websites.
And we have about 200 users managing and reading the analytics.
And so you can find this plugin, this plugin you can find it on the Matomo marketplace.
But also you can find this on the catalogue on the public administration catalogue in
Italy.
This is important because you say in the past, as you see, as you have seen in the past talks
by Claudio, there's a lot of effort making the local administration publishing their
software.
When they are asked to publish open source software online and make it shareable with
the public.
And so this is part of our contribution and this part of contribution is also available
to other public administrations also and also in the shop in the Matomo marketplace.
The second plugin, the second plugin is not a dating plugin because I had a small amount
of creativity in that day, but the name of this plugin is the user dates, it's not a
dating plugin, but it means that you can control the user behavior inside the Matomo.
You can omit them, you can avoid them making custom range reports because this kind of
reports are bloating or overloading the application.
So we chose to let them visit only pre-recorded reports and stay stick to there.
To make this, you must accomplish a small modification of the user interface and so
this plugin makes you do it.
We have also a personal team we use inside, but I don't feel, I don't felt what was interesting
because it's very easy to develop your plugin.
During these days and during these years, I've said, we also contributed to the development
of Matomo.
In the darker box, you can find a small amount of pull requests I've asked in the past.
And also, there are many, many issues I raised in the past.
I think this kind of contribution is very important to the community and it's very
important to the health of Matomo because it makes the audience, no, makes the core
developers aware of the audience.
Sorry for my bad English.
And if you want to learn Italian, just joking, you can visit the Italian section of the forum,
but it's not very crowded.
It's only, it's just the Italian part.
Also if you are engaged to Matomo somehow, I would like to suggest that you to participate
a lot more on the forums and also participating, exposing your wishes and your problems on
the issue on the GitHub.
And for now, my presentation is ended.
And now I think it's a good time to make a question and answer.
So I would like to pass the live to Marcus and let's go with the question and answer.
Thank you.
And thank all of you three for the very nice presentation.
So if anyone has any questions, please write them in the chat.
There have already been some questions, but if I didn't miss any of them, I think most
of them have already been answered.
So but if there's any new questions, I'm just gonna wait once again a minute to see if anything
pops up because it's late.
Well during the speech, I was starting some questions from the audience.
And one of them was a question for David.
They asked if your service, Web Analytics Italia, is a fork of Matomo.
And they also asked if you made also a personal team.
And another question was, I don't know, and I think there are no many questions.
If you have developed any plugin also.
Thank you, Pierluigi, I just answered all the questions in the chat during your presentation.
So I think there is no need to repeat my answers and to leave room if there are more questions.
There's one question that just popped up, which is, have you seen any other countries
contributing to Matomo as well?
Well, I know other countries are using Matomo and I know also the European Commission is
using Matomo, but I don't know if they are contributing in the sense of making plugins
or participating in the community.
Thank you.
I think I'm going to call it once again.
If there are any other questions, the chat is going to stay open and you can still ask
questions there.
Yeah, and with that, thank you once again for your presentations and have a great afternoon.
Thank you.
Thank you so much.
Goodbye.