Page MenuHomePhabricator

[Share Highlights] URL param for referrals from Share
Closed, ResolvedPublic3 Estimated Story Points

Description

As WMF staff, I want to be able to identify pageviews/visits originating with a shared link so that we have a durable (i.e., post-experiment) way of knowing how many readers find wiki projects via sharing and can prioritize future work accordingly.

References:

Report

Goal
  • use the wprov URL query parameter to indicate that a text-fragment URL comes from the Share Highlight feature
  • extract relevant traffic from webrequest by looking for the reserved x_analytics_map.wprov value
Approach
from wmfdata.spark import create_session
spark = create_session(app_name='shh-referrers')
q = """SELECT
  referer,
  referer_class,
  uri_host,
  uri_path,
  x_analytics_map.wprov AS wprov
FROM
  wmf.webrequest
WHERE
  year = 2026
  AND month = 4
  AND day = 17
  AND hour = 14
  AND http_status = 200
  AND x_analytics_map.wprov = 'shhu0'
  """
ddf = spark.sql(q)
ddf.show(truncate=False)

+-------+-------------+----------------+-------------+-----+
|referer|referer_class|uri_host        |uri_path     |wprov|
+-------+-------------+----------------+-------------+-----+
|-      |none         |fr.wikipedia.org|/wiki/DBpedia|shhu0|
|-      |none         |pl.wikipedia.org|/wiki/DBpedia|shhu0|
|-      |none         |en.wikipedia.org|/wiki/DBpedia|shhu0|
|-      |none         |it.wikipedia.org|/wiki/DBpedia|shhu0|
+-------+-------------+----------------+-------------+-----+
Takeaways
  • the URL's text fragment doesn't seem to be stored
  • there's nothing we can do if the source platform isn't referred. We'll get a - value, Etherpad is an example
  • wmf_raw.webrequest holds non-refined data, perhaps worth a look

Related Objects

Event Timeline

SherryYang-WMF renamed this task from [Share] URL param for referrals from Share to [Share Highlights] URL param for referrals from Share.Apr 1 2026, 9:23 PM
SherryYang-WMF triaged this task as High priority.

Can we use ?wprov ? Is there a team that we can rely on for existing infra?

egardner set the point value for this task to 3.Wed, Apr 15, 4:35 PM
mfossati changed the task status from Open to In Progress.Thu, Apr 16, 9:51 AM
mfossati claimed this task.

Change #1272803 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[mediawiki/extensions/ReaderExperiments@master] Share Highlight: add wprov to text-fragment URLs

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

Change #1272803 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Share Highlight: add wprov to text-fragment URLs

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