Especially for translation status pages like  it would be really helpful to have visit counts to prioritize the l10n work based on visitors.
For each document a "visits" field could be added and a (monthly) script import from Google Analytics could populate this field with data. We don't really need live data here. A "visits" field could then also be added to the $json of a document, so that we can use KumaScript to work with this data.
Les, Luke? Is there a way with Google Analytics to get us this data like described above?
Needinfo'ing Les and Luke.
Note that we don't need live values. Values updated monthly or even quarterly are perfectly fine.
Yes, there's a way and we should be able to re-use code like SUMO has for this:
You will need to file an WebOps bug to get PyOpenSSL==0.13 installed on the servers. The fun part is that RHEL has 0.10 installed and WebOps will need to jump through some hoops for you. See all the gory details we went through in bug 830496
After (quickly) digging into kitsune's code, found the basic bricks for GA/metrics there:
1. getting GA data in  (see #3) : This uses OAuth2client  (see #4 from :rrosario on this). Fecthing is done on different periods : 7 days / 30 days / 90 days / since the beginning. Only the en-US views are counted (this may be enough based on the hypothesis that en-US pages are the most visited pages and "give" the trends) (see also  and )
2. storing this data in the database in the table 'dashboards_wikidocumentvisits' ()
3. querying/creating a view for the content (the query uses info like tags, removes non-relevant pages ) ( and )
This allows to
- give a ratio dashboard ala "top 100/50/20" gauge to the final user for l10n
- give a freshness dashboard to English speaking contributors
(see picture attachments after)
needinfo'ing Luke for the following:
- is GA data available in a self-made kuma environment (i.e. one that I could make out of github and so on)?
- are we collecting GA data about things like "someone went to the [locale] version of the page but was redirected to the en-US version" or simply views per locale for a page?
 https://github.com/mozilla/kitsune/blob/master/scripts/schema.sql (goto dashboards_wikidocumentvisits definition)
Created attachment 8512699 [details]
dashboard available to the L10N contributors
We can see the "Top 50/20..." on this screenshot. I am not saying this is something we need in doc status pages.
Created attachment 8512700 [details]
Dashboard available for English speaking contributors
(In reply to Jean-Yves Perrier [:teoli] from comment #2)
> Note that we don't need live values. Values updated monthly or even
> quarterly are perfectly fine.
Do we want absolute values like 'nb of visits since forever' and/or also 'fresh visits' (like last 30 days) to react on "hot" pages? I don't know if this is relevant...
> needinfo'ing Luke for the following:
lorchard is not luke :)
(In reply to Les Orchard [:lorchard] from comment #9)
> > needinfo'ing Luke for the following:
> lorchard is not luke :)
mea culpa maxima :$ ^^
(In reply to Julien G from comment #8)
> (In reply to Jean-Yves Perrier [:teoli] from comment #2)
> > Note that we don't need live values. Values updated monthly or even
> > quarterly are perfectly fine.
> Do we want absolute values like 'nb of visits since forever' and/or also
> 'fresh visits' (like last 30 days) to react on "hot" pages? I don't know if
> this is relevant...
Visits over the last month (either 1st - 1st or sliding month, whatever is the most easy for the devs) is enough here (last = last at the point of the latest update, as we don't need live values)