Segment: The Customer Data Platform You Didn’t Know You Needed
Introducing Myself
Hi there! My name is Boris, and I’m a junior front-end developer at Meero with a passion for JavaScript and React. I love creating beautiful and intuitive user interfaces ✨, and I’m always striving to improve my skills in UI/UX design. When I’m not coding, you can usually find me trying out new recipes in the kitchen or in front of Japanese restaurants to eat my favorite dish is Karaage chicken !
Improving Our Web Platform with Segment: A Deep Dive into Customer Behavior
We recently launched our new web platform at Meero for realtors, which allows users to retrieve enhanced photos, consult their photo albums, download photos, and invite other users to use the platform. Prior to our web platform, we had two mobile apps (Realtors ✨) — one for Android and one for iOS — and initially used Segment on both. As we continue to grow and improve our platform, understanding our customers’ behavior and needs is crucial. That’s why we’ve turned to Segment, a powerful customer data platform that allows us to collect and analyze data from various sources. In this blog post, we’ll take a deep dive into how we’re using Segment to gain insights into our customers’ behavior, identify pain points, and make data-driven decisions.
What is Segment and How Does it Work
Segment is a customer data platform that helps businesses collect, unify, and analyze customer data from various sources. With Segment, businesses can better understand their customers, improve their marketing campaigns, and make more informed business decisions by integrating with a wide range of tools and platforms. Once integrated, Segment collects data from these sources and standardizes it into a unified format, which can then be sent to other tools for analysis and action.
Maximizing Your Insights: Using Segment’s Analytic SDK and Debugger for In-Depth Tracking
Let’s dive into analytic.js and see how to use SDK functions to track users, pages and events.
Identify
It allows businesses to tie a user to their actions and record traits about them. When a user interacts with a business’s web or mobile app, the Identify call is used to associate that user with a unique User ID. This User ID is then used to track the user’s behavior across multiple devices and platforms, providing businesses with a more complete picture of each user’s behavior and preferences.
Snippet of SDK function and a sample of a response payload:
export function identifyUser(segmentUser: SegmentUser) {
if (typeof window.analytics !== 'undefined') {
window.analytics.identify(segmentUser.userId, segmentUser);
}
}
{
"timestamp": "2023-06-22T15:38:21.605Z",
"integrations": {},
"userId": "usr|*userID*",
"anonymousId": "anonymousId",
"type": "identify",
"traits": {
"userId": "usr|*userID*",
...
},
"context": {
"page": {
"path": "home/fr",
"title": "Meero - home",
}
}
Page
With this tool you can track when a user views a page on your website and add optional properties about the page. It is one of the initial steps to begin using Segment as your analytics source.
By calling page or screen in a Segment source, you can easily record user activity and gather insights about their behavior on your website. This function is essential for tracking user engagement and making data-driven decisions to improve your website’s performance.
Snippet of SDK function and a sample of a response payload:
export function pageViewed(name: string) {
if (typeof window.analytics !== 'undefined') {
window.analytics.page(name);
}
}
{
"timestamp": "2023-06-22T15:38:12.400Z",
"integrations": {},
"userId": "usr|*userID*",
"anonymousId": "anonymousId",
"type": "page",
"name": "Home",
"context": {
"page": {
"path": "home/fr",
"title": "Meero - home",
}
}
Track
It allows to record any actions their users perform, along with any properties that describe the action. In Segment, each action is known as an event. Each event has a name, such as “User Registered”, and can include properties such as plan or accountType. By using the track API call to record events and properties, businesses can gain a deeper understanding of their customers’ behavior and preferences.
Snippet of SDK function and a sample of a response payload:
export function trackButtonClicked(
eventName: SegmentEventLabel,
contextData?: ContextData
) {
if (typeof window.analytics !== 'undefined') {
window.analytics.track(eventName, contextData);
}
}
{
"timestamp": "2023-06-22T15:43:16.974Z",
"integrations": {},
"userId": "usr|*userID*",
"anonymousId": "anonymousId",
"event": "Button Library Clicked",
"type": "track",
"properties": {
"page": "Home"
},
"context": {
"page": {
"path": "home/fr",
"title": "Meero - home",
}
}
Another tool that’s worth mentioning is Mixpanel
Mixpanel is a business analytics tool that helps companies understand how users interact with their website or mobile application. But unlike Segment it allows companies to track user engagement, retention, and conversion rates with the reports tools:
- Insight Reports: Explore data by segmenting and filtering event and users counts
- Flows Reports: Analyze how users move through your product by exploring paths between key actions
- Funnel Reports: Track user conversion rates through a series of steps. Identify where users drop off and make improvements to increase conversion rates.
- Retention Reports: Track user retention rates over time. Monitor how many users return after their first visit and identify trends in retention.
A Real-Life Use Case of Segment & Mixpanel in Action
Let’s take the scenario of the release of our web app. The sales team has launched a campaign to encourage customers to use the new platform to invite content managers and producers to join. To track the success of this campaign, we want to integrate Mixpanel with Segment to collect data on the total number of invitations sent to content managers and producers.
Data Visualization of total invitations sent
The long-awaited moment has arrived! We can now see how many invitations were sent out on the first day. A total of 15 content managers and 21 content producers were invited.
The sales team did a hell of a job and it paid off and we can say that the launch of the web application was a success 🎉! (All figures are fictional and serve only to illustrate the use case)
Wrapping Up: Why Segment is Must-Have Tools for Your Business
Segment is a customer data platform tool that helps businesses collect, unify, and analyze data from various sources. By using Segment, businesses can gain valuable insights into their customers’ behavior and needs, which can then be used to make data-driven decisions to improve their products, services, and marketing campaigns. Segment offers a comprehensive solution for businesses looking to make data-driven decisions and improve customer engagement and retention.
Before I wrap up, I just wanted to clarify that this article serves as a generalist introduction to Segment. However, I have some exciting news to share with you 🤩! Our data team at Meero is currently working on an in-depth article that will explore the challenges, benefits, and additional use cases of why we’re using Segment. We can’t wait to share our insights with you, so stay tuned for more content in the near future.