Segment Subscription
The SaaSquatch for Segment destination speeds up getting user data into SaaSquatch for uses cases such as registering users, tracking users, converting referrals, and triggering loyalty programs.
Beta Program - Version 2 of the SaaSquatch for Segment integration is part of our Beta Program. Please contact your account manager to have the integration enabled for you tenant.
Source / Stream | Destination / Subscription | Web Plugin | |
---|---|---|---|
Segment Integration Documentation |
|
|
Overview
The Segment destination consumes data sent from Segment to the SaaSquatch APIs for tracking events and upserting users.
Segment | SaaSquatch |
---|---|
Identify | Upsert User |
Track | Track User Event |
Installing the Segment Destination
Login to the SaaSquatch Portal
Go to your Integrations page
Enable the Segment integration.
Note: You must have the Segment integration enabled for your tenant by SaaSquatch before the option will show up on this page.
Copy your Segment Access Token
Login to your Segment account
Create a new Webhooks destination.
- Configure the destination with:
- Webhook URL:
https://segment.integrations.saasquatch.com/segment
- Header:
Authorization: Bearer {{YOURTOKENHERE}}
- Webhook URL:
Using Segment for Core Topics
Area | Solution |
---|---|
Identification | Identification is handled entirely by this integration. id and accountId are passed through the integration. |
Attribution | Attribution can either be done by ensuring that referredByCodes is a trait recorded in Segment, connecting the Branch integration for Mobile or by using Squatch.js for cookie tracking. |
Engagement | Engagement can be done by using the referralCode trait in your other marketing tools, by doing a batch export for email, or by using Squatch.js or the Mobile Widget for embedding widgets into your apps. |
Conversion | Conversion is typically triggered by either user traits, or tracked events such as order complete through this integration. |
Fulfillment | The Segment subscription does not solve fulfillment. Look at using our API, batch fulfillment, one of our 3rd party reward integrations or the Segment source. |
Identify Calls
Segment's identify calls are tracked in SaaSquatch by upserting users.
Custom Traits in Segment are mapped to Custom Fields in SaaSquatch
address
,birthday
,created_at
andid
traits are ignored, so they are not stored as custom fields on the SaaSquatch userThese Segment standard fields are mapped to SaaSquatch standard fields
avatar
in Segment is mapped toimageUrl
in SaaSquatchemail
in Segment is mapped toemail
in SaaSquatchfirstName
in Segment is mapped tofirstName
in SaaSquatchlastName
in Segment is mapped tolastName
in SaaSquatchname
in Segment is mapped/split intofirstName
andlastName
in SaaSquatchuserId
in Segment is mapped touser_id
andaccount_id
- Certain values are sanitized
- Non-alphanumeric characters in Segment traits are stripped.
- Text traits longer than 1024 characters are truncated.
- Trait names longer than 64 characters are truncated.
locale
in SaaSquatch is set based onlocale
in the Segment context.IP Addresses in SaaSquatch are set based on the
ip
in the Segment context.User Agent tracking in SaaSquatch uses the
user_agent
in the Segment context.Users with a
anonymousId
but without anuserId
will be ignored.
Track Calls
The Segment track calls are mapped to the SaaSquatch APIs for tracking events. Key names will be camelcased, and traits
will be stored as event fields
.
When the
account_id
trait doesn't exist, then theid
trait will be used in it's place. See Shared vs Solo Accounts.Users with an
anonymousId
but without auserId
will be ignored.Certain values are sanitized
- Text traits longer than 1024 characters are truncated.
- Trait names longer than 64 characters are truncated.
- Tracked event names longer than 64 characters are truncated.
- Non-alphanumeric characters in Segment traits are stripped.
- Non-alphanumeric characters in Segment event names are stripped.
These standard Segment Spec events are mapped:
Order Completed in Segment maps to the
purchase
in SaaSquatchOrder Refunded in Segment maps to the
refund
in SaaSquatchpurchase
andrefund
events in SaaSquatch are modelled based on the Segment spec, so contain all the same fields.
Page and Group Calls
These calls are not yet implemented in the SaaSquatch subscription destination.