PHP.net has almost no data about how people use it today, beyond basic server logs. This RFC from Larry Garfield and Roman Pronskiy adds analytics to the site, so the project can learn which pages matter most and put its time and money in the right places.

Why add analytics

PHP.net has over 17,000 documentation pages, and the PHP Foundation wants to help fund better docs. Without knowing which pages get the most visits, it's hard to decide where to start.

What the RFC does

The PHP Infrastructure Team, working with the Foundation, sets up Matomo, an analytics tool that runs on PHP's own servers instead of a third party's. A small script on PHP.net sends it page data.

Some details from the RFC:

  • Matomo is configured not to store personal information, such as names or other data that could identify you.
  • Only the Infrastructure Team can see the raw data, and that team may include PHP Foundation staff.
  • Some fully anonymized totals, like the most popular pages, may be shared publicly.
  • The privacy policy page gets a new "Analytics" section, which says you can opt out at any time.

Why Matomo, and why a script

The RFC picks Matomo because the Foundation's own site already uses it. It's also free software, written mostly in PHP, and has been around for over 16 years.

Matomo can read server logs instead of running a script in the browser, but the RFC says that would miss a lot. Pages served from a cache never show up in the logs, and a browser script can capture things logs can't, like time on page, how people use search, and desktop versus mobile traffic.

Self-hosting was a deliberate choice. Many people don't trust large companies with this kind of data, and with Matomo on PHP's own servers, no outside company sees it.

What it means for you

Nothing changes for your PHP code. When you visit PHP.net, the site collects anonymous stats about your visit, and you can opt out.

The vote

The vote asked whether to approve using Matomo for analytics. It passed 23 to 0, well over the two-thirds majority it needed. Voting ran from November 20 to December 4, 2024.