Skip to main content
All CollectionsCore Feature TutorialsAnalytics Tab
How To Integrate Segment With Your App For Additional Analytics
How To Integrate Segment With Your App For Additional Analytics

In this article we’ll show you how to pair Segment with your account so that you can get additional analytical data on your app.

A
Written by Amr Alshareef
Updated over 5 years ago

In our system we have integrated with a tool called Segment that helps with gathering analytics. In this article, we’ll be going over what Segment is, how to use it, and how to link it up with your app. 

What is Segment?

Before you can integrate it into your app, you should know what Segment is. Segment is a middleman of sorts between the service you’d like to analyze and the service with which you use to analyze it. It gathers raw data which in turn can be interpreted by an outside service that will give you lots of usable analytical data. We recommend using Mixpanel and will be showing how to sync Mixpanel with Segment, but you can use other similar services if you’d like.

With Segment you’ll be able to gather data such as: how often has it been installed? How often is it opened? How often is a feature opened? How often is a user registered? 

All of these actions are called “Events.” These Events accumulate over time and exist as information in your app. What Segment does is grabs those Events and puts them into an analytics tool (Mixpanel).

Once those Events’ data has gone through this analytics tool, you can start interpreting this information! This can help you improve the performance and success of your app. What if you see a spike in the number of people opening your app, but nobody opens your new feature? With this data you can begin to make improvements to your app such as readjusting your app’s design. 

As you can see, this knowledge is vital to understanding the nuances of your app, and can help you make important content and design decisions related to your app. Now that you have a better idea of what Segment is and what it can do for you, we’ll show you how to set it up.

How To Integrate Segment With Your App

To create a Segment account, go to segment.com, enter your email address, and click on “Get Started for free” here:

Now that you have created an account with Segment you’ll need to create a new Workspace.

You can name this workspace anything that you’d like.

Next you’ll need to make a connection. You can do this by clicking on the “Add a Source” button:

You’ll then need to look for a link titled “catalog” which can be found under “Website” and “Mobile App” next to the text “Browse other sources in…”:

This will take you to Segment’s catalog of other sources. Once here search for “Node.js” then click on it once you have found it.

This will bring you to a page that gives you more information about Node.js. What you will need to look for is the “Connect” button. Once you see it go ahead and click “Connect”.

You’ll be asked to name the source, and you can name it anything you’d like.

Now that you’ve established with Segment the type of source that you want to pull data from, the next step is to connect your app to Segment. You should see a Write Key under the Node.js source that you just created. Copy this key in its entirety. 

Next go to the Analytics tab in the App Dashboard and paste that key into the Segment Key field and click “Save”.

Now that you have connected our system with Segment you’ll need to connect Segment with an analytics tool. As we mentioned before we recommend using Mixpanel so we’ll be using that service for this article. Next we’ll go over how to do this.

How To Connect Segment And Mixpanel

Before you can connect Segment and Mixpanel you’ll need to create an account in Mixpanel which you can do at mixpanel.com. You will also need to create a project in your account. You can give this project any name that you’d like, and we’ll go over what the project is for in just a little bit.

Once you have created an account and a project in Mixpanel go back to the Workspace that you initially set up and click “Connections” on the left of the screen:

Then click on “Add Destination” next to “Destinations”:

This will bring you to Segment’s catalog of services that you can send the data to. Search for Mixpanel then select it.

This will take you Mixpanel’s individual listing where you can read more about the service if you’d like. On this page you’ll see a green button that says “Configure Mixpanel”. Go ahead and click on this button:

Next you’ll see Node.js listed under “Sources”. Click on this to select it and click "Confirm Source".

Once you have selected Node.js as your source go back to your Mixpanel account and click on the settings icon in the top right corner of the screen. From there select your project which should be listed under “Project Settings”:

Next in the Overview tab you should see Access Keys listed at the bottom of that page. Grab the Token and the API Secret and paste them into their corresponding fields in Segment:

Once you have copied and pasted the Token and API Secret into Segment, click on the toggle next to “Setup Guide” to activate the connection between Segment and Mixpanel.

Congratulations! You have now tied Segment to our system where it will start gathering raw analytical data for you, as well as Segment with Mixpanel which will begin displaying that raw data in a legible report.

Still have questions? No problem! Reach out to us and we’d be happy to help :)

Did this answer your question?