Page MenuHomePhabricator

Measure Google Translate Pageview Impact
Closed, ResolvedPublic

Description

Audiences management would like to be able to measure Google Translate pageviews and their fluctuation.

This task is for making this possible by way of queries against the web request table.

To avoid overloading the existing X-Analytics "proxy" key, and to allow for generality for other translation technology, we'll create a new X-Analytics key translationengine key, and for this particular implementation set a value of GT.

Event Timeline

Change 471257 had a related patch set uploaded (by Dr0ptp4kt; owner: Dr0ptp4kt):
[operations/puppet@production] Add Google Translate X-Analytics tagging

https://gerrit.wikimedia.org/r/471257

Code change looks good. So I understand: given that google translate is proxying requests it seems that it would do requests via a user agent that identifies request as coming from google translate so we would not need the header. Is that not the case?

Thanks for the review. The User-Agent field is that of the end user's device.

Change 471257 merged by BBlack:
[operations/puppet@production] Add Google Translate X-Analytics tagging

https://gerrit.wikimedia.org/r/471257

It's working nicely. Thanks @BBlack @Nuria!

select uri_host, uri_path, x_analytics_map['proxy'], access_method, agent_type, parse_url(referer, 'HOST'), parse_url(referer, 'PATH'), parse_url(referer, 'QUERY'), user_agent, isp_data['organization'], geocoded_data['country_code']
from webrequest
where
year = 2018
and month = 11
and day = 9
and hour = 1
and is_pageview
and x_analytics_map['translationengine'] = 'GT';
...
Fetched: <X> row(s)

To get a sense of proportion, it seems there were 460k of those Google-translated views overall on January 9 - quite a considerable number.

select COUNT(*)
from wmf.webrequest
where
year = 2019
and month = 1
and day = 9
and is_pageview
and x_analytics_map['translationengine'] = 'GT';

OK
_c0
460442

Closing out this for the old approach. Any new approaches would be worked separately.