Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

How to Create an Event in Segment With a Track Call

In Segment you create an event by sending a Track call from one of your sources. Give it an event name such as User Registered, add optional properties like plan, and make sure a userId or anonymousId goes with it. Segment recommends names built from a noun and a past-tense verb.

Events come from code, not a button

This is Twilio Segment, the customer data platform, not audience segments in an email tool. In Segment there's no form where you type in a new event. An event is created the first time your website or app sends a Track call with that name. Segment describes the Track call as the way to record any action users perform, along with properties that describe it, and each action is an event.

So creating an event is really two jobs: deciding what to call it, and adding one line of code where the action happens.

Naming the event before anyone writes code

Segment recommends human-readable names built from a noun and a past-tense verb, such as Video Recorded or Order Completed, and warns against names like Event 12. Agree the names with your team first, in a shared list. It's the quickest decision you'll make and the hardest to undo.

Good namePoor nameWhy
User Registeredsignup_btnSays what happened, not which button
Order CompletedEvent 12Readable months later
Video RecordedvideoNoun plus past-tense verb

Some names are reserved. Segment gives certain event names special meaning, called semantic events, and maps them to tools that support them. Use them when they fit what you're tracking.

Sending your first Track call

1. Pick your source

Choose the library you're tracking from, such as analytics.js for a website. Syntax differs by library, so the library-specific docs are on the Sources Overview page.

2. Call track with the event name

In JavaScript it looks like this: analytics.track('User Registered', { plan: 'Pro Annual', accountType: 'Facebook' }). The event field is required and is a string.

3. Add properties

These are optional and free-form, so add whatever describes the action, such as plan or accountType. Under the hood, the payload has type 'track', the event name and the properties object.

4. Tie it to a person

Every event needs a userId or an anonymousId. The User ID identifies a known user. The Anonymous ID is a pseudo-unique identifier for when you don't know who someone is yet. In browser and mobile libraries, a User ID is added automatically from an earlier Identify call, so you rarely set it by hand.

A starter tracking plan for a small business

If you run a service business with a website and a booking tool, a first plan might be as short as this:

Event nameUseful properties
Lead Form Submittedform name, page
Call Bookedcall type, source
Proposal Viewedproposal name
Account Createdplan, accountType
Newsletter Subscribedsignup location

Each one is a noun plus a past-tense verb, each answers a question you'll ask in a report, and none reuses a reserved property for another meaning.

Reserved properties can break your reports

Segment Docs, in the Track spec, explain the trap. Some property names are reserved, and revenue is the obvious one: Segment expects it to hold a revenue value and sends it on to tools that handle revenue tracking. Reuse it for something else, like a score, and your downstream reports fill with nonsense. Use reserved properties only for their intended meaning. Vague event names are just as hard to fix once other tools have started receiving them.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

Tracking events in RudderStack or Mixpanel

RudderStack's track call works the same way: it records a user's action with properties, and each action is an event with a name such as Product Reviewed.

Mixpanel documents tracking events from its JavaScript SDK.

If you're still choosing where your data should end up, my guide to product analytics tools compares the options, and my roundup of customer segmentation tools covers what you can do with the data next.

My advice: write the tracking plan first

Before your developer adds a single call, write a one-page list of the five to ten actions that matter to your business, each named noun plus past-tense verb, with the properties you'll want. Track those well and leave the rest. Ten clean events beat a hundred messy ones every time you sit down to read a report.

Want your tool on this list? Featured spots and reviews here are paid partnerships. Here's how to partner with me.

Frequently asked questions

What's an event in Segment?

A single user action recorded with a Track call, with a name and properties.

Is the event name required?

Yes. The event field is required; properties are optional.

How should I name events?

A noun and a past-tense verb, like Order Completed.

Do I need to send a user ID?

An event needs a userId or anonymousId. Browser and mobile libraries add them for you.

Are there reserved names?

Yes, reserved event names and property names such as revenue.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.