LogoLogo
Back to studio
  • Formsort documentation
  • โฉQuickstart
    • ๐ŸŸขGet started with Formsort
    • ๐ŸŽCore concepts
    • โ„น๏ธQuestion and content reference
    • ๐Ÿ“•Key terms
    • ๐Ÿž๏ธCreate your first flow
    • ๐Ÿ“–Add content and collect answers
      • ๐ŸคณCapture demographic data
      • โ„น๏ธAdd informational content
      • ๐Ÿ” Review your variable schema
    • ๐ŸŽจCreate a theme
      • Set brand guidelines
    • ๐ŸคนPersonalize your flow
      • ๐ŸŒŸTemplate your variables
      • ๐Ÿง Add conditional logic
      • ๐Ÿ’ซUsing conditional logic with Calculated and API variables
      • ๐Ÿ”šEnd the flow
    • ๐Ÿ”€Set up integrations
    • ๐Ÿš€Go live
      • Auditing your flow for content, functionality, and design
    • ๐Ÿ’ผCommon use cases
      • ๐Ÿ’”Disqualify responders
      • ๐Ÿ—“๏ธAdd a scheduling option
      • ๐Ÿ“„Allow responders to read and accept your company policies
  • ๐Ÿ—๏ธBuilding flows
    • Flows and variants
      • Flow starts
    • Adding content
      • Groups
      • Steps
        • Settings
        • Logic
        • Style
      • Questions
        • General Settings
        • Style
        • Address
        • Comparison
        • Confirmation
        • Date
        • Date & Time
        • Email address
        • File upload
        • Grid choice
        • Iframe
        • Image upload
        • Number
        • Payment
        • Phone number
        • Postal code
        • Question group
        • Region
        • Select
          • Providing choices via API or calculation
        • Signature
        • SSN
        • Text questions
        • Yes/No
      • Content
        • General Settings
        • Statement
        • Image
        • Video
        • Next button
        • Divider
        • Map
      • Endings
      • Using markdown
      • Using variable templating
        • Template formatting functions
      • Copy-pasting form content
      • Content library
    • Conditions and logic
      • Logical operator reference
      • Advanced logic
    • Variables (answers)
      • Variables from questions
      • Externally provided variables
      • Calculated variables
      • API lookups
      • System Library variables
      • Orphaned variables
    • Schemas
      • JSON Schemas
      • Validating flow schemas
    • Redirects
    • Styling and themes
      • CSS Reference
      • Overriding theme styling
      • Custom CSS overrides
      • Content area
      • Animations and transitions
      • Form Layout
      • Typography
        • Adobe Fonts
        • Hosting custom fonts
      • Color variables
      • Dimension variables
      • Question containers
      • Assets
      • Form Buttons
        • Select buttons
      • Inputs and dropdowns
      • Checkmarks
      • Tables
      • Sliders
      • Divider lines
      • Progress bar
      • Comparison cards
    • Variant settings
      • Form behavior for returning responders
      • Group ranking API
    • Publishing and versions
      • Preview window
      • Deploying
      • History
  • ๐Ÿ’พHandling data
    • Philosophy and data retention policy
    • Viewing form answers
    • Responder UUIDs
    • Environments
      • Loading different environments
    • Passing data in
      • URL parameters
      • POST body
      • Embed query parameters
    • Custom validators
    • Form answers and events
      • Analytics events
      • Signed requests
      • Event payload shape
      • Submission frequencies
      • Runtime error reporting
      • Admin API
      • Flow content data format
    • Integration reference
      • Amplitude
        • Amplitude cross domain tracking
      • BigQuery
      • FullStory
      • Google Analytics
        • Updating from Universal Analytics to GA4
      • Google Cloud Storage
      • Google Sheets
      • Google Tag Manager (GTM)
        • JavaScript triggered by flow events
      • Hubspot
      • Jornaya
      • Optimizely
      • PostgreSQL
      • Redshift
      • Rudderstack
      • S3
      • Salesforce
      • Segment
        • Segment Setup
        • Segment cross domain tracking
      • Stripe
      • TrustedForm
      • Webhooks
        • Zapier
  • ๐Ÿ“บGoing live
    • Custom domains
    • Built-in analytics
    • Embedding
      • Web-Embed API
        • React-embed
      • Adding authentication
      • Embedding forms in iOS and Android
      • Setting up a dev environment
    • Split testing
    • Preflight checklist
  • ๐ŸขTeams
    • Accounts
      • Roles and permissions
    • Events subscriptions
    • Workspace domain detection
Powered by GitBook
On this page
  • How Formsort uses identify()
  • Example track() payloads.
  • Sending form answers data to Segment
  • Hide IP

Was this helpful?

  1. Handling data
  2. Integration reference

Segment

Sending form events or answers data to Segment

PreviousSalesforceNextSegment Setup

Last updated 10 months ago

Was this helpful?

is by far the most dynamic integration option, which allows you to pick and choose other third - party providers to send data to within Segment.

How Formsort uses identify()

When the form flow loads, and a Segment integration is enabled, we will call segment's method, using the as the identification. The remaining events, using track() will also include the responder UUID.

If you are manually providing the responder's UUID, that will be used instead.

Alternatively, if you'd rather have identify called with the anonymous ID assigned by Segment, you can check Identify with anonymous ID. You will still have the responder UUID within the payload of the event if you need it to do some downstream correlations.

If you'd rather use the user's email as an identifying ID, you can set that option using Use email instead of uuid to identify users.

Use email instead of uuid to identify users is not recommended by Segment since it is easy to have email collisions.

Example track() payloads.

All events sent will include the flow label, , variant label, and variant UUID.

analytics.track('FlowLoaded', {
  answers: {},
  flowLabel: 'segment-test',
  responderUuid: '7f2ee814-6eb2-4607-a0f0-1ccb382dc0ba',
  variantLabel: 'main',
  variantUuid: '18d59d22-b4b4-4b62-a0f6-0e22861280f9'
});

In the preview window, events are normally not sent to third parties, but are instead logged. When you have Segment connected, you can also verify on the Segment side.

For step-aware flow events, such as StepLoaded or StepCompleted, the step index and step ID will also be sent. Step ID falls back to step index if an ID is not explicitly defined - we recommend setting Step IDs to facilitate analysis, as the index of steps may change over time.

analytics.track('StepLoaded', {
  answers: {},
  flowLabel: 'segment-test',
  responderUuid: '7f2ee814-6eb2-4607-a0f0-1ccb382dc0ba',
  stepId: 0,
  stepIndex: 0,
  variantLabel: 'main',
  variantUuid: '18d59d22-b4b4-4b62-a0f6-0e22861280f9'
});

Sending form answers data to Segment

By default, no answers are send to Segment.

If the answer state looks like:

{
  "email": "test@example.com",
  "favorite_cat": "Olivia",
}

answers will just be an empty object.

analytics.track('StepLoaded', {
  answers: {},
}

If you check Send answers, then all non-PII answers will be sent along with each event's metadata:

analytics.track('StepLoaded', {
  answers: {
    "favorite_cat": "Olivia",
  },
}
analytics.track('StepLoaded', {
  answers: {
    "email": "test@example.com",
    "favorite_cat": "Olivia",
  },
}

If Stringify answers object in payload is checked, the answers will be sent as a JSON string rather than a JSON object:

analytics.track('StepLoaded', {
  answers: '{"email": "test@example.com"}',
  // ...
});

If Only send answers from current step is checked, only the answers from the current step will be sent.

Hide IP

  • If Hide IP is checked, the IP that Segment normally sends along in the context will be replaced with 0.0.0.0, per the

  • If Hide page context is checked, the values of path, referrer, urland search will be replaced in the page set in the context sent by segment.

If Send PII is checked, , such as the responder's email (when it is given that semantic label), will be sent along with the answers:

Need more guidance? Followto set up Segment.

๐Ÿ’พ
Segment
identify
responder UUID
responder UUID
our guide
PII answers