Page MenuHomePhabricator

As a product analyst, I would like to differentiate a foreground http request from a background request
Closed, DeclinedPublic

Description

As a product analyst, I would like to differentiate a foreground http request from a background request. In order to do that, can we add a field to the http header when the app is sending a background request? E.g. Background=TRUE

Event Timeline

Couple things on this regard:

  • Tagging requests with headers is a lot less optimal than sending events when an intentional pageview has happened, therefore computations such us uniques can happen on top of data that represents events that are meaningful
  • A parameter that identifies requests that "are foreground" already exists, it has a poor name but I think we need to live with that for now. Please see:

https://github.com/wikimedia/puppet/blob/production/modules/varnish/templates/analytics.inc.vcl.erb#L201

Preview=1 identifies a "foreground" request that is not counted as a pageview.

The main purpose of this ticket is to provide a foreground/background tag so that we can count the foreground uniques using WMF-Last-Access-Global cookie. However, as pointed out in T202664#4609355, centralize cookie management is much harder than an eventlogging solution. Since we are not going to use the cookie for uniques counting, this tag is no longer needed.