LogoLogo
Back to studio
  • 🧠Core Concepts
    • Introduction to Formsort
    • Formsort quickstart guides
      • Add content and collect answers
      • Capture demographic data
      • Add informational content
      • Template your variables
      • Add conditional logic
      • Using conditional logic with Calculated and API variables
      • Add a scheduling option
      • End the flow
      • Review your variable schema
      • Set up integrations
    • How data works in Formsort
      • Responder UUIDs
    • Understanding flows
    • Versioning in Formsort (Deploying)
      • Variant revisions
      • Managing revisions
  • ✨Creating Flows
    • Building a new flow
      • Groups
      • Steps
      • Copy-pasting form content
  • Adding questions and content
    • Questions
      • Select
      • Text
      • Address
      • Comparison
      • Confirmation
      • Date
      • Date & time
      • Email address
      • File upload
      • Grid choice
      • Iframe
      • Image upload
      • Number
      • Payment
      • Phone number
      • Postal code
      • Question group
      • Region
      • Signature
      • SSN
      • Yes/No
    • Content
      • Statement
      • Image
      • Next button
      • Video
      • Divider
      • Map
  • Controlling the flow with conditions and logic
    • Advanced logic
  • Variable templating
  • Redirects and endings
  • Field validation
  • Flow and variant management
  • Content library
  • 🧬JSON Form Definition
  • JSON schemas
  • Validating flow schemas
  • Events subscriptions
  • Flow content data format
  • 🎨Styling
    • Customizing appearance
      • Content area & form layout
      • Buttons
      • Typography
      • UI states
      • Color and dimension variables
      • Question containers
      • Inputs and dropdowns
      • Checkmarks
      • Tables
      • Sliders
      • Divider lines
      • Progress bar
      • Comparison cards
      • Animations and transitions
  • CSS & Advanced Styling
    • Custom CSS overrides
    • Step styling
    • CSS reference
  • 🔁Form Behavior Settings
    • Variant settings
      • Form behavior for returning users
      • Group ranking API
    • Navigation sidebar
  • ⚙️Response Data Collection & Management
    • Schema (variables)
      • Variables from questions
      • Externally provided variables
      • Calculated variables
      • API lookups
      • System Library variables
      • Orphaned variables
  • Saving & retrieving responses
  • Importing Data
    • URL parameters
    • POST body
    • Embed query parameters
  • 📊Analytics and Attribution
    • Built-in analytics
    • Split testing
  • 🚀Publishing and Deployment
    • Live preview overview
    • Environments
      • Loading different environments
    • Embedding
      • Web-embed API
        • React-embed
      • Adding authentication
      • Embedding forms in iOS and Android
      • Setting up a dev environment
    • Pre-deployment checklist
  • 📁Workspace Management
    • Accounts
      • Roles and permissions
    • Custom domains
    • Workspace domain detection
  • 🛠️Formsort Admin API
    • Admin API
  • 🔌Integrations
    • Form answers and events
      • Analytics events
      • Signed requests
      • Event payload shape
      • Submission frequencies
      • Runtime error reporting
    • 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
Powered by GitBook
On this page
  • Overview
  • Setup
  • Step 1: Add the responder_user_id as an external variable
  • Step 2: Set external user id as identifier in Segment integration settings
  • Step 3: Pass the responder id as a query parameter to responders hitting the flow

Was this helpful?

  1. Integrations
  2. Integration reference
  3. Segment

Segment cross domain tracking

Track responders in Segment across domains

PreviousSegment SetupNextStripe

Last updated 10 months ago

Was this helpful?

Overview

If you would like to track Segment users across multiple domains e.g:

  • Site 1: https://www.example.com

  • Site 2: https://www.flow.example.com (the domain hosting the Formsort flow)

You must explicitly set and pass the responder UUID from the top level domain to the one hosting the Formsort flow. This can be done for both with a direct link deployment or an embedded flow.

Setup

Step 1: Add the responder_user_id as an external variable

Navigate to the variable tab inside of a flow and add an external variable.

Name the variable "responder_id" and set the data classification toggle to responder_user_id. This variable will be used to pass the responder id as a query parameter from https://www.example.com to https://www.flow.example.com

Step 2: Set external user id as identifier in Segment integration settings

Step 3: Pass the responder id as a query parameter to responders hitting the flow

Passing via direct link

After deploying the flow with the variable set in Step 1, you can now pass a Segment user id into the flow as a query parameter.

For example this may look like:

https://flow.example.com/client/{{your_account_name}}/flow/{{your_flow_name}}/variant/{{your_flow_variant_name}}/?responder_id={{segment_user_id}}

Passing via embed

<EmbedFlow
  clientLabel="client"
  flowLabel="onboarding"
  queryParams={[['responder_id', '<value>']]}
  embedConfig={{
    origin: "https://flow.example.com", // if you use custom domains
  }}
/>
const embed = FormsortWebEmbed(rootEl, {
  origin: "https://flow.example.com", // if you use custom domains
});

embed.loadFlow(
  'client', // client label
  'onboarding', // flow label
  'main', // variant label - optional
  [['responder_id', '<value>']] // query params
)

In Formsort's Segment integration settings, toggle on "Use user_id from answers to identify" option

To read more about how external variables work, read this .

If you want to enable cross domain tracking in an embedded flow, you can pass responder_id via query_params in our package. e.g.

If you don't use react, you can do the same using our . e.g.

🔌
documentation
react-embed
web-embed-api