Hi there,
I'm User:Diskdance, and recently I'm developing a default gadget for Chinese Wikipedia enhancing MediaWiki's variant handling logic, and under certain circumstances a prompt is shown at page load asking for a user's preferred variant. Consider it as a conditional Cookie notice, and its English screenshot can be found at https://commons.wikimedia.org/wiki/File:VariantAlly-En.png.
Iknowthis can be very disruptive on UX, so I tend to be careful about its negative impact on page views. If the gadget can collect telemetry data about the prompt's display frequency and user interactions(using e.g. WikimediaEvents), I can know about its possible impact.
Is this possible? It would be much appreciated if anybody could provide assistance.
Best wishes,Diskdance
On Mon, Nov 27, 2023 at 7:36 AM psnbaotg via Wikitech-l < wikitech-l@lists.wikimedia.org> wrote:
I *know *this can be very disruptive on UX, so I tend to be careful about its negative impact on page views. If the gadget can collect telemetry data about the prompt's display frequency and user interactions (using e.g. WikimediaEvents), I can know about its possible impact.
Is this possible? It would be much appreciated if anybody could provide assistance.
Possible but quite complex. You need to define a corresponding event schema and event stream, send data from the gadget to the event stream, and access the data (or have some access the data) in the analytics cluster. The documentation we have is not great but you need roughly these steps: - request a volunteer NDA (or find someone who has one) [1] for hive access [2] - define your event schema (e.g. list of user interactions you are going to log) in the form of a patch to the schemas/event/secondary [3] repository. See docs [4][5]. - assign a stream to the schema in the main Wikimedia configuration [6] - from the gadget, log the event using `mw.eventLog.submit( streamName, eventObject )`. [7] - ssh into the statistics server [8], authenticate with Kerberos, run hive, and you can query the data under event_sanitized.<schema name>
[1] https://wikitech.wikimedia.org/wiki/Volunteer_NDA [2] https://wikitech.wikimedia.org/wiki/Analytics/Data_access#ssh_login_to_analy... [3] https://gerrit.wikimedia.org/r/plugins/gitiles/schemas/event/secondary/+/ref... [4] https://wikitech.wikimedia.org/wiki/Event_Platform/Schemas#Creating_a_new_sc... [5] https://wikitech.wikimedia.org/wiki/Event_Platform/Schemas/Guidelines [6] https://wikitech.wikimedia.org/wiki/Metrics_Platform/Creating_An_Instrument#... [7] https://www.mediawiki.org/wiki/Extension:EventLogging/Guide#Underlying_techn... [8] https://wikitech.wikimedia.org/wiki/SRE/Production_access#Setting_up_your_ac...
I would suggest using the Statsd counters that WikimediaEvents exposes to MediaWiki JavaScript (including Gadgets and user scripts!). This is a public API, with aggregate data publicly accessible via Grafana.
These require no server-side configurations, schemas, or private data access. And (on the flipside) also do not record any personal information.
To use it, call mw.track( counter.gadget_<gadgetname>.<metricname> ) in your gadget.
For example:
mw.track( 'counter.gadget_VariantAlly.storage_empty_dialog' );
To make visualising easier, I've put together a generic dashboard to plot these: https://grafana.wikimedia.org/d/000000037/gadget-stats
-- Timo Tijhof https://timotijhof.net/
On Mon, 27 Nov 2023, at 09:33, psnbaotg via Wikitech-l wrote:
Hi there,
I'm User:Diskdance, and recently I'm developing a default gadget for Chinese Wikipedia enhancing MediaWiki's variant handling logic, and under certain circumstances a prompt is shown at page load asking for a user's preferred variant. Consider it as a conditional Cookie notice, and its English screenshot can be found at https://commons.wikimedia.org/wiki/File:VariantAlly-En.png.
I *know *this can be very disruptive on UX, so I tend to be careful about its negative impact on page views. If the gadget can collect telemetry data about the prompt's display frequency and user interactions (using e.g. WikimediaEvents), I can know about its possible impact.
Is this possible? It would be much appreciated if anybody could provide assistance.
Best wishes, Diskdance
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
+1 to statsd as a great way to get started with as little friction as possible. I've bubbled this up to the folks that make decisions about instrumentation, so if you find yourself wanting to do things beyond what's possible with statsv, please chime back in here and let us know.
On Thu, Nov 30, 2023 at 8:02 PM Krinkle krinkle@fastmail.com wrote:
I would suggest using the Statsd counters that WikimediaEvents exposes to MediaWiki JavaScript (including Gadgets and user scripts!). This is a public API, with aggregate data publicly accessible via Grafana.
These require no server-side configurations, schemas, or private data access. And (on the flipside) also do not record any personal information.
To use it, call mw.track( counter.gadget_<gadgetname>.<metricname> ) in your gadget.
For example:
mw.track( 'counter.gadget_VariantAlly.storage_empty_dialog' );
To make visualising easier, I've put together a generic dashboard to plot these: https://grafana.wikimedia.org/d/000000037/gadget-stats
-- Timo Tijhof https://timotijhof.net/
On Mon, 27 Nov 2023, at 09:33, psnbaotg via Wikitech-l wrote:
Hi there,
I'm User:Diskdance, and recently I'm developing a default gadget for Chinese Wikipedia enhancing MediaWiki's variant handling logic, and under certain circumstances a prompt is shown at page load asking for a user's preferred variant. Consider it as a conditional Cookie notice, and its English screenshot can be found at https://commons.wikimedia.org/wiki/File:VariantAlly-En.png.
I *know *this can be very disruptive on UX, so I tend to be careful about its negative impact on page views. If the gadget can collect telemetry data about the prompt's display frequency and user interactions (using e.g. WikimediaEvents), I can know about its possible impact.
Is this possible? It would be much appreciated if anybody could provide assistance.
Best wishes, Diskdance
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Wow, this method looks promising. Will try this to see if it suits my needs. Thank you!
Best regards, Diskdance
On Friday, December 1st, 2023 at 8:59 AM, Krinkle krinkle@fastmail.com wrote:
I would suggest using the Statsd counters that WikimediaEvents exposes to MediaWiki JavaScript (including Gadgets and user scripts!). This is a public API, with aggregate data publicly accessible via Grafana.
These require no server-side configurations, schemas, or private data access. And (on the flipside) also do not record any personal information.
To use it, call mw.track( counter.gadget_<gadgetname>.<metricname> ) in your gadget.
For example:
mw.track( 'counter.gadget_VariantAlly.storage_empty_dialog' );
To make visualising easier, I've put together a generic dashboard to plot these: https://grafana.wikimedia.org/d/000000037/gadget-stats
-- Timo Tijhof https://timotijhof.net/
On Mon, 27 Nov 2023, at 09:33, psnbaotg via Wikitech-l wrote:
Hi there,
I'm User:Diskdance, and recently I'm developing a default gadget for Chinese Wikipedia enhancing MediaWiki's variant handling logic, and under certain circumstances a prompt is shown at page load asking for a user's preferred variant. Consider it as a conditional Cookie notice, and its English screenshot can be found at https://commons.wikimedia.org/wiki/File:VariantAlly-En.png.
Iknowthis can be very disruptive on UX, so I tend to be careful about its negative impact on page views. If the gadget can collect telemetry data about the prompt's display frequency and user interactions(using e.g. WikimediaEvents), I can know about its possible impact.
Is this possible? It would be much appreciated if anybody could provide assistance.
Best wishes, Diskdance
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Hi all,
The new version of VariantAlly using mw.track has been deployed on Chinese Wikipedia, and it works great.
But currently I can only see one metric at a time on [this dashboard](https://grafana.wikimedia.org/d/000000037/gadget-stats), it would be better if I could see multiple metrics at the same time for comparation (grouped by variant-prompt-* and variant-prompt-mobile-*). It seems that I cannot edit the panel myself. Could somebody provide any assistance? It will be much appreciated.
Best, Diskdance On Friday, December 1st, 2023 at 1:10 PM, psnbaotg via Wikitech-l wikitech-l@lists.wikimedia.org wrote:
Wow, this method looks promising. Will try this to see if it suits my needs. Thank you!
Best regards, Diskdance
On Friday, December 1st, 2023 at 8:59 AM, Krinkle krinkle@fastmail.com wrote:
I would suggest using the Statsd counters that WikimediaEvents exposes to MediaWiki JavaScript (including Gadgets and user scripts!). This is a public API, with aggregate data publicly accessible via Grafana.
These require no server-side configurations, schemas, or private data access. And (on the flipside) also do not record any personal information.
To use it, call mw.track( counter.gadget_<gadgetname>.<metricname> ) in your gadget.
For example:
mw.track( 'counter.gadget_VariantAlly.storage_empty_dialog' );
To make visualising easier, I've put together a generic dashboard to plot these: https://grafana.wikimedia.org/d/000000037/gadget-stats
-- Timo Tijhof https://timotijhof.net/
On Mon, 27 Nov 2023, at 09:33, psnbaotg via Wikitech-l wrote:
Hi there,
I'm User:Diskdance, and recently I'm developing a default gadget for Chinese Wikipedia enhancing MediaWiki's variant handling logic, and under certain circumstances a prompt is shown at page load asking for a user's preferred variant. Consider it as a conditional Cookie notice, and its English screenshot can be found at https://commons.wikimedia.org/wiki/File:VariantAlly-En.png.
Iknowthis can be very disruptive on UX, so I tend to be careful about its negative impact on page views. If the gadget can collect telemetry data about the prompt's display frequency and user interactions(using e.g. WikimediaEvents), I can know about its possible impact.
Is this possible? It would be much appreciated if anybody could provide assistance.
Best wishes, Diskdance
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
On Thu, Dec 7, 2023 at 6:41 AM psnbaotg via Wikitech-l < wikitech-l@lists.wikimedia.org> wrote:
But currently I can only see one metric at a time on this dashboard https://grafana.wikimedia.org/d/000000037/gadget-stats, it would be better if I could see multiple metrics at the same time for comparation (grouped by variant-prompt-* and variant-prompt-mobile-*).
I've created a draft dashboard that does this, which can be found here: https://grafana.wikimedia.org/d/2wpKk7DIk/gadget-variantally-metrics. Hopefully that's what you were aiming for.
It seems that I cannot edit the panel myself. Could somebody provide any assistance? It will be much appreciated.
Per https://wikitech.wikimedia.org/wiki/Grafana#Editing_dashboards, you'll need to request a volunteer NDA in order to be able to edit Grafana dashboards.
-Sam
On 2023-12-07 15:58, Sam Smith wrote:
On Thu, Dec 7, 2023 at 6:41 AM psnbaotg via Wikitech-l <wikitech-l@lists.wikimedia.org mailto:wikitech-l@lists.wikimedia.org> wrote:
But currently I can only see one metric at a time on this dashboard <https://grafana.wikimedia.org/d/000000037/gadget-stats>, it would be better if I could see multiple metrics at the same time for comparation (grouped by variant-prompt-* and variant-prompt-mobile-*).
I've created a draft dashboard that does this, which can be found here: https://grafana.wikimedia.org/d/2wpKk7DIk/gadget-variantally-metrics. Hopefully that's what you were aiming for.
This seems like a good idea, so I went ahead and made similar changes to the generic dashboard as well, to allow selecting and graphing multiple metrics.
On 2023-12-01 01:59, Krinkle wrote:
I would suggest using the Statsd counters that WikimediaEvents exposes to MediaWiki JavaScript (including Gadgets and user scripts!). This is a public API, with aggregate data publicly accessible via Grafana.
These require no server-side configurations, schemas, or private data access. And (on the flipside) also do not record any personal information.
To use it, call mw.track( counter.gadget_<gadgetname>.<metricname> ) in your gadget.
For example:
mw.track( 'counter.gadget_VariantAlly.storage_empty_dialog' );
To make visualising easier, I've put together a generic dashboard to plot these:
I wrote this up along with some other advice on a wiki page: https://www.mediawiki.org/wiki/Gadget_kitchen:_recording_metrics
Please make corrections!
(The dashboard is now found at https://grafana.wikimedia.org/d/IlK0cZbSk/gadget-stats, I don't know how that happened.)
wikitech-l@lists.wikimedia.org