Skip to content

Instantly share code, notes, and snippets.

@krismeister
Created September 9, 2013 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krismeister/6501967 to your computer and use it in GitHub Desktop.
Save krismeister/6501967 to your computer and use it in GitHub Desktop.
// Assign the module to a Browser global. Ex: root.logger = factory(root.mb)
root.mb = root.mb || {};
root.mb.metrics = root.mb.metrics || {};
root.mb.metrics.ga = root.mb.metrics.ga || {};
root.mb.metrics.floodlight = root.mb.metrics.floodlight || {};
var metricsCore = factory(
// List ALL dependencies that this module has. Access the dependencies through the Browser globals (root is window)
root.jQuery,
root.mb,
root.mb.logger,
root.mb.events,
root.mb.metrics.ga,
root.mb.metrics.floodlight
);
root.jQuery.extend(root.mb.metrics, metricsCore);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment