AACFlow

Segment

Track events and manage customer data with Segment CDP

Usage Instructions

Integrate Segment Customer Data Platform into your workflow. Track user events and behaviors, identify users with traits, record page views, associate users with companies or groups, and send batch events to sync data across all your marketing and analytics tools from a single source of truth.

Tools

segment_track

Track a custom event in Segment for a user or anonymous visitor

Input

ParameterTypeRequiredDescription
writeKeystringNoSegment source write key
eventstringNoName of the event to track (e.g. "Order Completed")
userIdstringNoUnique identifier for the user
anonymousIdstringNoAnonymous identifier (required if userId not provided)
propertiesjsonNoEvent properties as JSON object
contextjsonNoContext information as JSON object (ip, locale, page, etc.)
timestampstringNoISO 8601 timestamp of the event
integrationsjsonNoControl which integrations receive the event as JSON object

Output

ParameterTypeDescription
successbooleanWhether the event was tracked successfully
eventstringName of the tracked event
userIdstringUser ID associated with the event
anonymousIdstringAnonymous ID associated with the event

segment_identify

Identify a user and set their traits in Segment

Input

ParameterTypeRequiredDescription
writeKeystringNoSegment source write key
userIdstringNoUnique identifier for the user
anonymousIdstringNoAnonymous identifier (required if userId not provided)
traitsjsonNoUser traits as JSON object (name, email, plan, etc.)
contextjsonNoContext information as JSON object
timestampstringNoISO 8601 timestamp

Output

ParameterTypeDescription
successbooleanWhether the identify call was successful
userIdstringUser ID that was identified
anonymousIdstringAnonymous ID that was identified

segment_page

Record a page view in Segment

Input

ParameterTypeRequiredDescription
writeKeystringNoSegment source write key
userIdstringNoUnique identifier for the user
anonymousIdstringNoAnonymous identifier (required if userId not provided)
namestringNoName of the page (e.g. "Home", "Product Detail")
categorystringNoCategory of the page
propertiesjsonNoPage properties as JSON object (url, title, referrer, etc.)
contextjsonNoContext information as JSON object
timestampstringNoISO 8601 timestamp

Output

ParameterTypeDescription
successbooleanWhether the page view was recorded successfully
namestringName of the page
userIdstringUser ID associated with the page view
anonymousIdstringAnonymous ID associated with the page view

segment_group

Associate a user with a group or account in Segment

Input

ParameterTypeRequiredDescription
writeKeystringNoSegment source write key
groupIdstringNoUnique identifier for the group or account
userIdstringNoUnique identifier for the user
anonymousIdstringNoAnonymous identifier (required if userId not provided)
traitsjsonNoGroup traits as JSON object (name, industry, plan, etc.)
contextjsonNoContext information as JSON object
timestampstringNoISO 8601 timestamp

Output

ParameterTypeDescription
successbooleanWhether the group association was successful
groupIdstringGroup ID that was associated
userIdstringUser ID that was associated
anonymousIdstringAnonymous ID that was associated

segment_alias

Create an alias between a new userId and a previous anonymous or userId in Segment

Input

ParameterTypeRequiredDescription
writeKeystringNoSegment source write key
userIdstringNoThe new canonical user ID to merge into
previousIdstringNoPrevious ID (anonymous ID or old user ID) to alias from
contextjsonNoContext information as JSON object
timestampstringNoISO 8601 timestamp

Output

ParameterTypeDescription
successbooleanWhether the alias was created successfully
userIdstringNew canonical user ID
previousIdstringPrevious ID that was aliased

segment_batch

Send multiple Segment events (track, identify, page, group) in a single batch request

Input

ParameterTypeRequiredDescription
writeKeystringNoSegment source write key
batchjsonNoArray of Segment event objects (each with type, userId/anonymousId, and event data)
contextjsonNoGlobal context applied to all events in the batch

Output

ParameterTypeDescription
successbooleanWhether the batch was sent successfully
countnumberNumber of events sent in the batch

En esta página

Empieza a construir hoy
Más de 100 000 constructores confían en nosotros.
La plataforma SaaS para crear agentes de IA y operar tu fuerza de trabajo agéntica.
Empezar