bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Measure clicks to /samples/

NEW
Unassigned

Status

developer.mozilla.org
General
4 years ago
2 years ago

People

(Reporter: groovecoder, Unassigned)

Tracking

(Blocks: 1 bug)

Details

(URL)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1076893#c2

We want to measure the traffic (i.e., clicks) to code samples under /samples/. We can do this via the code for link-tracking [1], but we should be careful that it only activates on developer.mozilla.org/samples urls.

[1] https://github.com/mozilla/kuma/blob/de71f658c396f281201f02b93a523d9928f3e288/media/redesign/js/analytics.js#L53-L88
I think click measurement is unnecessary, it's enough to see when these paths are visited in the server logs. For example, running this against one of the web servers:

grep "GET /samples/" access_log 

returns that:

* Someone is fetching /samples/video/chroma-key/index.xhtml
* The page https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions refers to /samples/cssref/transitions/sample2/
* The page https://developer.mozilla.org/en-US/docs/Web/SVG/SVG_animation_with_SMIL refers to /samples/svg/svganimdemo1.html

We could discover a lot about "used" samples, and what MDN pages are still referring to them, through some log parsing and zero new code.
Note that most of these links are via macros, listing the uses of this macros will give us the list of pages using them.

We looked at it a few month ago, with Jannis. It is a significant amount of work for the content team to get rid of them and Jannis told us it will not be needed for AWS.
You need to log in before you can comment on or make changes to this bug.