In T102079: Metrics about the use of the Wikimedia web APIs we have defined various rollup tables based on raw Action API (/w/api.php) activity. One of the dimensions that we are measuring is User-Agent to help answer questions like
- Ranking of user agents coming from Labs or third party services with a highest activity, on a monthly basis + all time (DevRel, to help identifying the services making intensive use of our APIs)
@Nuria has pointed out that User-Agent data is scrubbed from webrequest tables after 90 days because of the protections assured by https://wikimediafoundation.org/wiki/Privacy_policy.
The open question is whether or not the requesting User-Agent is PII when accessing /w/api.php in the same way that it is when reading or editing an article as human interactive process considering https://meta.wikimedia.org/wiki/User-Agent_policy