thoughtbot/suspenders — pull request #332 by croaky (2014-04-30 06:38:21+00:00)
Title: Set up Segment.io by default

In order to analyze metrics later, we need to instrument our app to log the
right metrics. The primary type of instrumentation we care about is called
"event tracking."

We ese Segment.io to capture events whenever possible. It is basically the
adapter pattern for analytics services.

Segment.io lets us drop one JS library into our web apps, or one Ruby library
into our server-side framework, or one iOS SDK into our mobile apps. Then, we
can toggle on and off different services such as Google Analytics, Intercom,
and others.

http://playbook.thoughtbot.com/#instrumentation

If we are working on an app that uses authentication through a library such as
Clearance, we should add the following to
`app/views/application/_analytics.html.erb`:

<% if signed_in? %>
<%= render 'signed_in_analytics' %>
<% end %>

https://github.com/thoughtbot/clearance

At that time, we should also add
`app/views/application/_signed_in_analytics.html.erb`:

The most likely first signed in service we'll want is Intercom. It plays two
important roles for an early stage product:

1. communication (and support) with customers and
2. measuring retention (such as Weekly Active Users)

https://intercom.io