How to connect the Segment integration
Last updated October 23, 2026
Overview
Segment is a tool many companies use to collect what customers do in their product. Connecting it to Atlas means your agents see that activity without asking the customer.
Think of it like this:
- An user, let's say Alex Lee signs up in your app. Segment sends an "Identify" event. Atlas creates Alex as a customer.
- Alex completes a purchase. Segment sends a "Track" event. Atlas adds it to Alex's timeline.
- Alex writes to support. Your agent opens the ticket and already sees who Alex is and what Alex just did.
To make this work, you create a key in Atlas and paste a ready-made script in Segment. You don't need to write code.
Key Features
- No coding needed: Copy a ready-made Atlas script into Segment and add your key.
- Customers created automatically: Customers identified in Segment are created or updated in Atlas.
- Accounts from Segment: Companies sent from Segment are created or updated as Atlas accounts.
- Activity in the timeline: Product events and page views appear in the customer's timeline, also inside their tickets.
- Test before going live: Send sample events from Segment and check the result in Atlas.
- Key control: Revoke a key at any time to stop Segment from sending data.
What Segment sends to Atlas
| When Segment sends… | Example | What you see in Atlas |
| Identify | Alex signs up or logs in | A new or updated customer, shown as "Customer created via Developer API" in the timeline. The "User ID" is the ID from your product |
| Track | Alex completes a checkout | An entry in the customer's timeline with the event's title, for example "Checkout Completed" |
| Page | Alex views your pricing page | A "Page Viewed" entry in the customer's timeline |
| Group | Alex's company is set | A new or updated account |
How to connect Segment to Atlas
Part 1: Create a Segment key in Atlas
- In Atlas, click the main menu button and select "App Configuration" .
- Click "Integrations" and select "Segment".
- Under "Segment API Keys", click "Add Key".
- Copy the key, check "I have copied the key" and click "Save".
Part 2: Build the destination function in Segment
- In Atlas, click "Connect Segment". Your Segment workspace opens.
- In Segment, go to "Connections > Catalog" and open the "Functions" tab.
- Click "Create Function", select "Destination" and click "Next: Build Function".
- Delete the sample code in the editor and paste the Atlas script below.
- In the third line, paste your key between the quotes:
const SEGMENT_TO_ATLAS_TOKEN = 'your key';
This is the Atlas script you copy. Scroll inside the box to see all of it, and copy it from the first line to the last. It's the same for every workspace: copy it as it is and only add your key. The script tells Segment what to do with each event: create customers (onIdentify), add events to the timeline (onTrack and onPage) and create accounts (onGroup).
Part 3: Test it and create the function
- In the test panel, click "customize the event yourself".
- Paste this sample Identify event and click "Run":
- Paste this sample Track event and click "Run" again:
- When the output shows "Success" for both events, click "Next: Configure & Create".
- Name the function, for example "Atlas", add a short description and click "Create Function".
Then connect the function to the Segment source that collects your product's data, so real events start flowing to Atlas.
Part 4: See the result in Atlas
- In Atlas, open "Customers" and select the test customer, for example
alex.segment@example.com. - The timeline shows "Customer created via Developer API" (from the Identify event) and "Checkout Completed" (from the Track event).
How to revoke a Segment key
Revoke a key when you stop using it or if someone saw it. Segment can't send data with a revoked key.
- In Atlas, go to "App Configuration > Integrations > Segment".
- Open the key's actions menu and click "Revoke", then confirm.
- To see revoked keys, turn on "Show revoked".
FAQs & Troubleshooting
Do I need a developer?
Not to connect it. You copy a key and paste a script. Your developers already send events to Segment; this setup only forwards them to Atlas.
What is the App ID on the Segment page?
It identifies your Atlas workspace. It's the same app ID used in the install snippet. You don't need it for the destination function.
Why don't I see the customer in Atlas?
Check the following:
- The event has a
userId. - The key is pasted correctly in the script and isn't revoked.
- The function's test output shows "Success".
- The function is connected to your Segment source.
Can I choose where Segment events appear?
Yes. In "App Configuration > Data > Custom events" , turn "Show in Timeline" and "Show in Session Recording" on or off for each event. Read How to manage custom events.

