Applying the Adapter Pattern for Analytics in Ember.js Apps

Applying the Adapter Pattern for Analytics in Ember.js Apps

Presented at Boston Ember

At DockYard, most (if not all) Ember apps we build for our clients require analytics in some form or other. For many of these apps, including the Google Analytics tracking script is sufficient. However, we’ve begun to notice an increased interest in other services such as Mixpanel or Kissmetrics for more data minded clients.

Including multiple services (typically we see about 3–5 different analytics in use) with different APIs leads to code duplication, which is less than ideal and generally a maintenance nightmare. I don’t know about you, but deleting repetitive code is one of my favorite things to do — so Michael and I set out to build an Ember addon that would apply the adapter pattern to analytics.

C8fccffc013096c4b465b50c284a5208?s=128

Lauren Tan

August 13, 2015
Tweet