Getting started
Data source
School
Academy
Advanced
Segment
You can connect your data from Segment.com to June in a couple of clicks to get your instant analytics.
Connect Segment
You have three options to connect Segment to June:
1. From the June onboarding
2. From the June settings
3. From Segment side
Set up Segment
There are 3 things you need to set up in Segment to properly use June.
1. Identify your users
In order to understand which users are using your product, you need to identify them with Segment's identify
call. The best place to invoke the identify call is when a user signs up successfully or logs into your product.
Here's how a simple example of the code looks like:
analytics.identify("123", {
name: "Peter Gibbons",
email: "peter@example.com",
plan: "premium",
logins: 5
});
2. Start instrumenting your product
There are multiple ways to instrument your product with Segment ⏤ track events and page events are the most popular methods.
Track events help you capture data based on your user's behaviour which means tracking the actions they perform. An example is when a user clicks on the signup button. How you instrument your product is up to you, but we recommend capturing the hot paths of a user's journey inside your product.
Here's an example:
analytics.track("User Registered", {
plan: "Pro Annual",
accountType: "Facebook"
});
Page events are the easiest to set up. Those can capture all pages a user can visit inside your product. However, various browser ad blockers can impact page events which would result in lower quality data. For this reason we recommend to use mainly track events.
3. Identify your companies
The group call is identical to the identify call, except that it helps you identify companies (full workspaces) inside of your product instead of individual users. This will allow you to use our company-level reports inside of June and see which companies are using your product and what they are doing.
Here's an example of how a group call looks like:
analytics.group("0e8c78ea9d97a7b8185e8632", {
name: "Initech",
industry: "Technology",
employees: 329,
plan: "enterprise",
"total billed": 830
});
← Previous
Next →