Use the schema implemented in https://phabricator.wikimedia.org/T98569
Code review
The patch for this task is up for review on GitHub. It can be tested (make sure to start up a dev EL server on localhost:8080) via http://earldouglas.github.io/www.wikipedia.org/
Some questions to consider:
- Does anything look obviously bad/broken/dangerous?
- Does the sampling rate seem reasonable for www.wikipedia.org? Note that EventLogging is currently about at about
300%100% capacity.- We'll be going with a 1% sampling rate, which should put us at ~3 events per second
- Can anyone think of a better way to version control this? e.g. move it from a Meta template into a git repo?
- This seems to be the established convention
- Does it support enough browsers (tested so far in FF, Chrome, IE6, IE7, and IE8)
Deployment
- Edit the temp version of the template on meta
- Request on the Talk page that the changes be imported
- Find an admin on meta to import the changes
- Clear cache, smoke test
TODOs from feedback on email thread:
- I noticed that the schema version in the code is different from *Schema:WikipediaPortal*
- Solution: the schema version is up to date
- document.getElementsByClassName won't work on IE8.
- Solution: try both the above and document.body.getElementsByTagName
- a.onclick (form.onsubmit) ... it overrides any other onclick (onsubmit) event handlers
- Solution: no other handlers exist to be overridden
- And as I understand, you’re using navigator.sendBeacon, which is not supported in IE
- Solution: no use of the Beacon API
- get some numbers on how much/little load times would increase
- Negligable: 9Kb adds a global average of 0.0023 seconds
- extend this analytics work to other portals such as Wiktionary
- Solution: nope