Synap Academy
Search…
⌃K

Segment

Use Segment to connect Synap to hundreds of other tools and platforms.
Segment is a fantastic platform and one we highly recommend. Segment unifies all of your data and makes sure its ready to go into other tools in the right way. Using segments means you don't need to installing different codes onto your website / portals in order to connect it to other tools.
A really common integration is connecting Synap (Source see Segment docs on Sources) to a chat widget like Intercom (Destination see Segment docs on Destinations) you can also :
  • Connect Analytics tools such as Google Analytics, Mixpanel and Localytics
  • Connect Payment Processors such as Stripe
  • Send your data to a secure data warehouse
  • Access event data
If you already have a Segment account, create a new source for Synap add in the URL. Once the source is set up, copy the Write key
Head over to Settings > Integrations. From here you'll see a box to input your Segment Write key.
Settings > Integrations

Event Data

Segment lets you view event data for key events on Synap. You can use Segment's Track and Page events to see what users are doing and what page they're on. Then through Segment's Identify tie those events back to users.
Using identify to link users to events in Segment

Identify

Attributes attached to the user will show in Segment as EI- see below for an example of an Identify call payload.
{
"userId": "QsogF1GDFZ",
"traits": {
"EI-Role": "Health and Safety Manager",
"createdAt": "new Date('2021-11-26T10:09:52.447Z')",
"email": "[email protected]",
"emailVerified": false,
"firstName": "Homer",
"lastName": "Simpson",
"marketingEmailsConsent": "removed",
"name": "Homer Simpson",
"profilePicture": "https://upload.wikimedia.org/wikipedia/en/0/02/Homer_Simpson_2006.png"
}
}

Track

Began test is an example of a Track event, it is linked to the user using their userId these events tend to exclude titles and rely on testId and attemptId Note: an attemptId is a users unique attempt on a particular testId
{
"event": "Began Test",
"integrations": {},
"messageId": "node-xxxxxxxxxx",
"originalTimestamp": "2022-01-18T18:37:43.245Z",
"properties": {
"Quiz Mode": "test",
"attemptId": "rae6sql3AD",
"testId": "RG70wQdFDl"
},
"receivedAt": "2022-01-18T18:37:43.872Z",
"sentAt": "2022-01-18T18:37:43.246Z",
"timestamp": "2022-01-18T18:37:43.871Z",
"type": "track",
"userId": "QsogF1GDFZ"
}

Page

Page calls will show the page path and unique URL. Synap content pages will always contain an identifier in the url ie:
  • /collections/
  • /assignment/
  • /quiz/
  • /insights/
{
"name": "Springfield Portal",
"path": "/quiz/a/rae6sql3AD",
"referrer": "",
"search": "?title=Springfield%Exam",
"title": "Springfield Summer Exam",
"url": "https://portal.synap.ac/quiz/a/rae6sql3AD?title=Springfield%Exam"
}
Segment has a lot of documentation and resources, if you're interested they have a free online university to help you get started: Segment University