Skip to content

Instantly share code, notes, and snippets.

Patrick Meenan pmeenan

Block or report user

Report or block pmeenan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pmeenan / gist:7465158c6439db066a53
Created May 20, 2015
RUM Speed Index Custom Metric
View gist:7465158c6439db066a53
var RUMSpeedIndex = function(win) {
win = win || window;
var doc = win.document;
Support Routines
// Get the rect for the visible portion of the provided DOM element
var GetElementViewportRect = function(el) {
pmeenan / user-timing-rum.js
Last active Jul 8, 2019
Support routine for adding W3C user timing events to a site. Includes some basic polyfill support for browsers that don't support user timing or navigation timing (though the start time for non-navigation timing support could be improved with IE < 9 to use IE's custom start event).
View user-timing-rum.js
// Support routines for automatically reporting user timing for common analytics platforms
// Currently supports Google Analytics, Boomerang and SOASTA mPulse
// In the case of boomerang, you will need to map the event names you want reported
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable:
// rumMapping = {'aft': 'custom0'};
(function() {
var wtt = function(n, t, b) {
t = Math.round(t);
if (t >= 0 && t < 3600000) {
// Google Analytics
You can’t perform that action at this time.