segmentio/analytics.js-integration — pull request #8 by yields (2014-04-28 09:25:07+00:00)
Title: add .mapping(name)

i realized that [some](https://github.com/segmentio/analytics.js-integrations/blob/master/lib/bing-ads.js#L27) integrations name the `.events` differently, while [other](https://github.com/segmentio/analytics.js-integrations/blob/master/lib/curebit.js#L54) integrations use mappings for different things.

just added a `.mapping(name)` static method that will add `proto[name]` method that will do what `.events(str)` did.

for example curebit would use `.campaigns(name)` and bing would use `.goals(goal)`, maybe we should consider even namespacing them ? like `.map.goals(str)` ?

LMK what you think

cc @ianstormtaylor