There are so many great analytics tools out there that it’s often hard to know what to use. What’s more, each one comes with its own flavor of JavaScript API that’s slightly different from all the rest, meaning each new one you choose to add, even if you’re not sure it’s right for you, is a ton of work to implement.

Analytics.js – one API to wrap them all

Thanks to our friends at Segment.io, there is now a free, open-source solution to this problem. Analytics.js is an open source JavaScript library that wraps the native APIs of over 50 popular analytics, marketing, and error tracking tools into a sensible, common interface. For anyone who has implemented Google Analytics + KISSmetrics + UserVoice + Hubspot + foo + bar all on one site, you know what this could mean for code cleanliness.

Also consider the huge business win – instead of carefully deciding on each analytics solution before prioritizing the implementation, you can instead try several solutions all at once, with no extra effort, then choose the best to keep after evaluating them all with real data.

Here’s how it works

There’s great documentation available here, but the implementation instructions mostly refer to Segment.io’s paid offering (which is worth a look if you want something even easier to use, and with a REST API). For my example, I’m going to assume you’re building a Rails app, but you can apply the below to any framework.

1. Initialize Analytics.js

Download Analytics.js from its repo on GitHub. There is a minified version included, but since most Rails apps use the asset pipeline, I use the unminified source and let Rails do the rest. Vendor this JS by placing it in /vendor/assets/javascripts.

You’ll now want to load Analytics.js on all pages. However, it isn’t necessary to block on this, so to speed things up, it is recommended that you load it asynchronously. I typically do this in a shared partial that I then include in all my layouts.

So, you’ve launched your MVP… congratulations! That’s a huge achievement, but don’t kid yourself – your v1 product is almost certainly not ready to scale into a real business. MVPs are, by definition, the minimal feature set you need to start learning with real users, and the speed at which you’re able to learn and act on those learnings will mean all the difference between success and failure.

Success metrics are your tool to focus on what really matters

You’re probably already collecting qualitative and quantitative data about your website or app. With all of the great tools out there such as Google Analytics, KISSmetrics, Mixpanel, and Flurry, collecting data is easy. What’s not easy is being data-driven – leveraging this data consistently to prioritize, plan, and assess your activities.

My number one tip is to start simple, by developing high level success metrics that, based on your best assumptions, are the key drivers of your business. Document these and make them a part of your team and investor meetings, and focus maniacally on optimizing them one at a time.

Lastly, beware of “vanity metrics” such as gross users, page views, or total downloads – numbers that are “since the beginning of time” are not actionable, so be sure to use cohorts and time intervals as the context of your measures.

Start with 3-5 metrics for customer and business success

Many products are naturally conducive towards breaking out success metrics into customer success and business success categories. Customer success metrics are measures that tell you, directly, whether users are getting value from your product, while business success metrics focus on your own business outcomes.

Example customer success metrics:

% Users Who Complete a Key Workflow – Without doing this, your users will fail. For example, for an email marketing tool, this would be sending your first email campaign. In Dave McClure’s Pirate Metrics, this is the Activation part of your funnel.

% Retention – Do users come back as often as they need to get reasonable value from your product? Set a goal based on your assumption of how often a satisfied customer will use your product.

NPS (Net Promoter Score) – gives you a way to quantify customer satisfaction as you iterate your offering. Measure it consistently and don’t game it. Set a goal for this to be very positive (+50). You need to wow early adopters.

Example business success metrics:Set goals for these based on what would create a sustainable business.

% Visit to Sign Up - How much website traffic do you need to get a new user?

% Conversion to Paying Customers – Are users willing to buy at the price offered?

CAC (Customer Acquisition Cost) - How much does it cost to land a customer? This may encompass the above 2 plus the cost of leads / traffic and sales.

The purpose of choosing success metrics is to use them to focus your business activities, so you’ll want to create a convenient way for anyone on your team to view them. The simplest way to start is to track week over week data in Google Sheets or Excel. Many analytics tools also have automated reports for many of these metrics. Try to create a format to display your success metrics in an accessible way, and use it to discuss trends with your team weekly and to adjust priorities.

Avoid “analysis paralysis” with OMTM

In the book Lean Analytics, co-authors Alistair Croll and Ben Yoskovitz advocate choosing One Metric That Matters – a single metric that your team will focus on above all others for a time. This is a great tactical approach to iterate towards business success by channeling your team’s energy to attack your opportunity one step at a time.

Startup metrics is a very broad topic – here are even more great resources for further reading:

Whether you’re a lean startup or a mature business, having a clearly articulated product vision, which includes your target customer, problem / solution, and why you’re different, is key to success.

Here’s a framework I often use when working with clients to develop a product vision. It’s designed to be a 1-hour exercise you can use with your team, so try it out, print it out, and use it to frame your more detailed conversations.

1. Who are your target users/customers?Example: Developers and managers on software teams

2. What are the substantial pain points you are trying to solve?Example: Developers often don’t know what to work on next. Managers don’t know what’s being worked on or how long these things will take. Many project management tools are cumbersome, hard to learn, and take time to configure.

3. What is your solution (one sentence or soundbite)?Example: Pivotal Tracker is an easy to use agile project management tool.

4. What are the most important benefits you are delivering (vital few)?Example: Easy, transparent project management; Clear insights into what’s being worked on and what’s next; Real-time collaboration; A reliable software development metric that matters (velocity)

5. What are the main alternatives or competitors?Example: There are many other online solutions. Other solutions people use today include physical Kanban / project status boards and Excel spreadsheets.

6. Why is your solution better than alternatives?Example: Simple, great UI; Real-time updates / no need to refresh; Current status and backlog is fast and easy to update; Iterations are planned automatically; Team velocity is tracked automatically and accurately; Automatic, accurate forecasting

Now, put it all together:

For , who need , our product provides . Our product is better than other solutions such as and because .

In my next post, we’ll address the next phase – choosing success metrics, and using them to validate your product/market fit.

Aaron Severs
San Francisco

As a member of Pivotal Lab's product management team, I help clients build successful products. Prior to Pivotal Labs, I founded CollegiateLink, an enterprise SaaS startup. I also managed social media products at Constant Contact.