SaaSquatch Help Center

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 our Success Team.

Source / Stream Destination / Subscription Web Plugin
Segment Integration Documentation
  • Tech Reference

🔗 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

  1. Login to the SaaSquatch Portal

  2. Go to your Integrations page

  3. Enable the Segment integration.

Segment Integration

Note: You must have the Segment integration enabled for your tenant by SaaSquatch before the option will show up on this page.

  1. Copy your Segment Access Token

  2. Login to your Segment account

  3. Create a new Webhooks destination.

Segment Webhook Destination

  1. Configure the destination with:
    • Webhook URL:
    • Header: Authorization: Bearer {{YOURTOKENHERE}} Segment Webhook Config

🔗 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 and id traits are ignored, so they are not stored as custom fields on the SaaSquatch user

  • These Segment standard fields are mapped to SaaSquatch standard fields

    • avatar in Segment is mapped to imageUrl in SaaSquatch
    • email in Segment is mapped to email in SaaSquatch
    • firstName in Segment is mapped to firstName in SaaSquatch
    • lastName in Segment is mapped to lastName in SaaSquatch
    • name in Segment is mapped/split into firstName and lastName in SaaSquatch
    • userId in Segment is mapped to user_id and account_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 on locale 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 an userId 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 the id trait will be used in it's place. See Shared vs Solo Accounts.

  • Users with an anonymousId but without a userId 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 SaaSquatch

  • Order Refunded in Segment maps to the refund in SaaSquatch

  • purchase and refund 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.