API Docs for: 0.6.1

Analytics.common Class

Access point: ac.analytics.* Provides an easy way to stash analytics information within child mojits and retrieve them within parent after the children have been executed. Data handled by this addon, however, cannot be used to augment the normal data flow. IE: you cannot retrieve analytics data and then call ac.done().

Item Index



  • cb
  • [optional]

To retrieve analytics data that has been stored by child mojits, call this function and provide a function, which will be called once the children have been dispatched and all their analytics data has been merged.


  • cb Function

    callback invoked with the analytics object.

  • [optional] Object optional

    scope scope of the callback.


  • fn

Allows a way for addons mixed in after this one to set an alternate data merge function when analytics from multiple children are combined. The default merge function is the same one used internally by Mojito to merge meta data, and will be sufficient for most use cases.


  • fn Function

    user-defined merge function, which should accept two objects, the first is "to", and the second is "from". this function should return the merged object.


  • val

Store an analytic value. This function can be called multiple times within a mojit, and uses a merging function to combine objects.


  • val Object

    An object bag full of whatever you wish.