Formsort
Search…
Segment
Sending form events or answers data to Segment
Segment 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 identify method, using the responder UUID 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 responderUuid 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, although this is not recommended by Segment since it is easy to have email collisions.

Example track() payloads.

All events sent will include the flow label, responder UUID, variant label, and variant UUID.
1
analytics.track('FlowLoaded', {
2
answers: {},
3
flowLabel: 'segment-test',
4
responderUuid: '7f2ee814-6eb2-4607-a0f0-1ccb382dc0ba',
5
variantLabel: 'main',
6
variantUuid: '18d59d22-b4b4-4b62-a0f6-0e22861280f9'
7
});
Copied!
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.
1
analytics.track('StepLoaded', {
2
answers: {},
3
flowLabel: 'segment-test',
4
responderUuid: '7f2ee814-6eb2-4607-a0f0-1ccb382dc0ba',
5
stepId: 0,
6
stepIndex: 0,
7
variantLabel: 'main',
8
variantUuid: '18d59d22-b4b4-4b62-a0f6-0e22861280f9'
9
});
Copied!

Sending form answers data to Segment

By default, no answers are send to Segment; in this configuration,
If my answer state looks like
1
{
2
"email": "[email protected]",
3
"favorite_cat": "Olivia",
4
}
Copied!
Answers will just be an empty object:
1
analytics.track('StepLoaded', {
2
answers: {},
3
}
Copied!
If you check Send answers, then all non-PII answers will be sent along with each event's metadata:
1
analytics.track('StepLoaded', {
2
answers: {
3
"favorite_cat": "Olivia",
4
},
5
}
Copied!
If Send PII is checked, PII answers (such as the responder's email, when it is given that semantic label) will be sent along with the answers:
1
analytics.track('StepLoaded', {
2
answers: {
3
"email": "[email protected]",
4
"favorite_cat": "Olivia",
5
},
6
}
Copied!
If Stringify answers object in payload is checked, the answers will be sent as a JSON string rather than a JSON object:
1
analytics.track('StepLoaded', {
2
answers: '{"email": "[email protected]"}',
3
// ...
4
});
Copied!
If Only send answers from current step is checked, only the answers from the current step will be sent.

Hiding PII

  • 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.
Last modified 3mo ago