Segment

This page describes how to use Census with Segment.

🏃‍♀️ Getting Started

In this guide, we will show you how to connect Segment to Census.

Segment Documentation on Write Keys are here.

  • Create a new HTTP API Source in the Connections page of Segment (found under "Server")

  • Name your connection and optionally label it (We recommend "Census" for ease of debugging)

  • Copy your write key from the saved connection

  • Navigate to the Destinations page of Census, click on the "New Destination" button and select Segment, and paste the created token in the designated field

  • Census will convert this right here and now you're all set with the Segment Connection!

Note: Census's permissions will be the same as this Segment token.

Make sure to follow Segment's Documentation on connecting a Production Source here.

🗄 Supported Objects and Behaviors

Segment support is pretty straight forward! Let us know if you want Census to support more objects for Segment.

Object Name

Supported?

Sync Keys

Behavior

User

User ID or Anonymous ID

Update or Create

Group

Group ID, or User ID / Anonymous ID

Update or Create

Track (Event)

Append

Track events

Like most Events, Segment Track Events have the standard set of fields. Though the event type field is the only required field, you should typically set at least all the standard event fields.

  • event (required) - This is the event type field

  • anonymousId or userId (one of these required) - This indicates which user caused or triggered the event

  • timestamp - The time the event occurred. If not provided, Segment will use their server time when the event was received by them (which can be quite different from when it happened, particularly if you're using Census to backfill events).

  • context and integrations - Optional event context and controls. See Arrays and Nested Objects for more information on how to create objects to map to these fields.

For more information on the meaning of different Segment fields, take a look at their documentation.

Group Syncs

You can use Group destination object in two different ways:

  • Creating and Updating new Groups - Use the Group ID Sync Key to uniquely identify new groups and add traits to them.

  • Associating Users with Groups - Use the User ID (or Anonymous ID) as Sync Key to associate users with the Group they're a member of.

🚑 Need help connecting to Segment?

Contact us via support@getcensus.com or start a conversation with us via the in-app chat.

Last updated