Federation Analytics

I tried to add a plugin that would enable somehow google analytics. This work didn't lead to anything interesting. Here I rant in our chat as to why this is so. chat

Monday April 17, 2017.

I signed up for google analytics many years ago. I remember from then that I could add a verification meta tag to my home page or add a verification file in my home directory. I chose the former and the tag is still there. Google provided the verification code. Its presence proved to google that I "owned" c2.com.

In our conversation last week I picked up that someone was wanting to verify their ownership of a farm hosted subdomain of federated wiki and wished to use the verification file in the home directory approach. This sounded like a simple route addition which could be handled by a custom plugin. I'm less convinced now because I could not find any clear documentation of the process on google help pages and I couldn't remember the details from my own verification so many years ago. I'm happy to return to this problem if someone can explain the complete process to me and provide references.


Verification of site ownership is just the beginning of the dance with google analytics. One must add their javascript to each web page to be analyzed. This code contains an identifying key which is reported back to google. The magic of analytics is that nearly every site operator uses this free service. This ubiquity allows google to watch people move from site to site. They then slice up this global view and report fragments back to each site operator with charts and graphs of visitor behavior. I logged into analytics last night and found that they now offer reports on individual visitors tracked over time. This is all pretty spooky and not at all aligned with my own vision of public service.


Without a global view like google's one cannot tell what visitors are doing within our federation. That is because the pages one "owns" get viewed by javascript that comes from diverse origins with diverse owners. And this division of ownership happens before anyone forks anything.


Our current implementation emits tracking information consistent with the attribution clause of the creative commons license. This strikes a balance that respects the privacy of readers while offering transparency into sources that they have chosen to republish. Our public history also allows anyone to build a scraper that collects this information for a federation wide view. I publish source code and accumulated results of one such scraper as an existence proof.

I would like to offer authors a good sense of the impact they have but this won't come with the precision that a modern digital marketing organization would desire. We're not doing this for them.


See New Relic Browser for detailed instrumentation aggregated over many users.