This post is part of the ongoing Distribution series. Every week the 500 Distribution Team highlights actionable resources for marketing your startup. Get even more tips by following @500Distribution on Twitter and subscribing to our email newsletter.
You might be overwhelmed by the sheer number of analytics platforms for startups. In my opinion, event-based analytics provide the most insight, unlike a platform like Google Analytics that focuses on usage metrics like pageviews and time on site. After testing out a few options, I’ve come to really like Mixpanel because it’s simple, fast, and has great documentation so you can get up and running quickly.
But even with great documentation, there are a few mistakes that first timers are likely to make. Here’s what you need to know to get started.
Client vs. Server Side Implementation
There aren’t many differences between the two types of implementation, but this is why I think server side is the way to go:
Distinct IDs are the way all event based analytics platforms associate different events that occur on websites to the individual users who perform those events. Each user, whether signed in or not, should have a distinct ID. With a server side implementation, you will need to create and store distinct IDs for both brand new and existing users.
A distinct ID is any string of characters that can uniquely identify a user of your product. You will send the distinct ID along with each event to tell Mixpanel which events were performed by which users. Since we’re doing everything server side you will need to create this distinct ID yourself.
But what do you actually do with your distinct ID? When do you create a new one? What about existing users? Here’s how to create and assign distinct IDs for different users that come to your site.
The distinct ID for users can be stored in 2 places: in our database, or in a cookie on the user’s computer. We should always try to use the database version first, which requires that a user is registered and logged in.
When a user visits our website, we first need to check if they’re logged in. If they are, that means they are registered and can’t be a new user; if they aren’t, check if the user already has a cookie from our website. A user could already be registered but not logged in, and if that’s the case, they should already have a cookie from us.
If we determine that a user is brand new (not logged in and doesn’t have a cookie), we need to create a distinct ID for them.They aren’t registered yet, so we shouldn’t store their distinct ID in our database. That’s because we don’t have a good way to associate this user with a database record. Instead, we’ll create and store their distinct ID in a cookie on their computer. When they register, we’ll store their distinct ID in our database.
People vs. Events
Mixpanel breaks down analytics into two parts: people and events. Events are actions that happen on a website, such as a registration, purchase, or a click. People are the customers that perform these events. In the screenshots of Mixpanel below, everything under “engagement” has to do with events, and everything under “people” is – obviously – people.
Super properties are extremely powerful. Using them, you can set up persistent properties that are sent with every event to Mixpanel. Normally, properties are only sent once per event, but with super properties, we can set a property that gets sent with every future event a user takes. We use this feature to conduct split tests. When running a split test, it’s important to pay attention to two things: the outcome of the page the experiment is testing (of course) and how the different variants in the split test affect their actions going forward.
Mixpanel is a great tool, but it can be a little overwhelming to set up. Be sure to think through how you want to model your product using Mixpanel before you start coding. Even after implementing Mixpanel on 10+ products, I often require revisions after the first implementation. As with everything, analytics is an ongoing process. Understanding why things happen in your product is critical for every startup, so the time required to get analytics up and running is well worth it.
Matt helps 500's portfolio companies understand their analytics and get more people to their product by any means necessary. His best strategy so far has been carrier pigeons. When not helping startups, Matt can be found running after his dog on the beach while she chases birds (carrier pigeon recruitment?).