One of the first tasks during my time at SpecialMoves and my first work with the Rolex brand was to architect a javascript metrics layer that both the Flash and HTML sites could talk to for their navigation/interaction tracking requirements.

Using John Resig’s Simple Javascript Inheritance, I created a system that was driven from a central controller, using a factory pattern to instantiate and prepare and execute either page view or interaction commands.
The commands all inherit from an abstract command class, that defines basic logic and common functionality.