Page MenuHomePhabricator

Consider adding a comment to the citation template noting that it was filled in with Web2Cit data
Closed, ResolvedPublic

Description

We currently have no way to track Web2Cit usage.

It has been suggested that logging Web2Cit server requests from Wikipedia may be used as an indirect measure (T302696) of Web2Cit usage. However, we cannot be sure if citations were actually inserted in the end.

We may thus consider further tweaking the Citoid extension to add something (maybe a comment?) to the citation template if it was inserted using Web2Cit-generated data.

In addition, we may consider adding a hidden page category in these cases noting that some citations have been added using Web2Cit.

Although these additions would be useful to understand Web2Cit usage, the Wikipedia community may reasonably not like them, as it would add some clutter to Wikipedia articles.

Event Timeline

Alternatively, consider adding a tag to the edit summary if a Web2Cit-generated citation was inserted. This seems to be what Proveit does.

We would need community approval, as the tag should be added to each Wikipedia's Special:Tags.

See here for an example of the kind of charts produced via mw.track

We would need community approval, as the tag should be added to each Wikipedia's Special:Tags.

There're two kinds of "tags": change tags and hash tags. Change tags need to be approved by each Wikipedia and defined in Special:Tags before they can be set for any edit. However, hashtags are simply strings like #Web2Cit that you can add to an edit summary (either manually or programmatically), and can then be tracked via https://hashtags.wmcloud.org. They do not need any previous approval from each wiki and are therefore far more convenient.

Furthermore, I'd recommend adding [[meta:Web2Cit|#Web2Cit]] rather than just #Web2Cit, to add some extra context by linking back to your main documentation page, and also to do some "advertising" for your tool. However, if you do, the https://hashtags.wmcloud.org tool will not detect the hashtag, UNLESS YOU ADD A SPACE BEFORE THE HASH, like so: [[meta:Web2Cit| #Web2Cit]]

Gracias @Sophivorus! That's all very useful information.

We may thus consider further tweaking the Citoid extension to add something (maybe a comment?) to the citation template if it was inserted using Web2Cit-generated data.

The good thing of this approach is that we can more reliably confirm that Web2Cit was used to introduce a citation, and which citation that was. The edit summary alternative approach may be less reliable, as users may add a citation with Web2Cit, but then decide to remove the citation before publishing the changes.

On the other hand, I see at least two problems with this approach. First, that it will have to be internationalized to fit different language Wikipedias, if we want to include a comment more explanatory than simply "Web2Cit". Second, that the comment would probably remain in place even if the citation is edited in later revisions (although it would continue to be true that it was originally added with Web2Cit).

The Cite news template documentation, for example, shows an example of how comments may be used inside citation templates. In our case it could be something like: {{Cite news<!--Inserted with Web2Cit-->|author=...}}.

First, that it will have to be internationalized to fit different language Wikipedias, if we want to include a comment more explanatory than simply "Web2Cit".

We may workaround this by using messages from other components, such as Citoid extension's citoid-citoiddialog-credit (Powered by $1).

the Wikipedia community may reasonably not like them, as it would add some clutter to Wikipedia articles.

These are English Wikipedia recommendations about using this kind of invisible comments:

Our proposed use case is not listed but doesn't seem to be explicitly forbidden either, although they say its use should not be abused.

diegodlh claimed this task.

Edit summary hashtag implemented in f19a0db9:

  • We now add [[meta:Web2Cit| #Web2Cit]] to the edit summary if one or more Web2Cit citations have been inserted. Tracked on https://hashtags.wmcloud.org/?query=Web2Cit.
  • If no prior edit summary has been defined, we prepend "Add a citation" string, using localized Citoid's citoid-citoiddialog-title message.
  • If contributor deliberately chooses not to accept our suggestion, we won't try again until a new Web2Cit citation has been inserted.
  • Note that in cases where an edit session is recovered (see T57370), we don't keep track of Web2Cit citations added in previous sessions.
  • Also note that, as opposed to Change tags (which we are not using), the user can always remove the hashtag from the edit summary before publishing.

Action tracking implemented in ad028884:

  • Six actions have been defined:
    • generate: when Web2Cit is used to generate a citation; deliberately not triggered in cases where Citoid only is used (even with Web2Cit enabled).
    • insert: when a Web2Cit-generated citation is inserted.
    • insert_other: when Web2Cit has been used to generate a citation, but a non-Web2Cit citation is inserted instead.
    • edit: when the edit link of a Web2Cit citation is clicked.
    • edit_error: when the Web2Cit edit button in the Citoid dialog error (see T347273) is clicked.
  • Should be available for tracking here soon: https://grafana.wikimedia.org/d/IlK0cZbSk/gadget-stats?var-gadget=Web2Cit&var-metric=mediawiki_gadget_Web2Cit_total
  • Note that this action tracking may be blocked by some browser addons, such as ublock.

Published changes to Wikipedia here: https://en.wikipedia.org/w/index.php?title=User:Diegodlh/Web2Cit/script.js&diff=prev&oldid=1349564699

Updated documentation accordingly here: https://en.wikipedia.org/w/index.php?title=User:Diegodlh/Web2Cit/script&diff=prev&oldid=1349566552

Thanks @Sophivorus for the cool ideas!