Segment is a Customer Data Platform (CDP) that enables you to collect, clean and control customer data. By integrating Segment with SurveySparrow, you can:
Push survey data to Segment
Trigger surveys based on events inside Segment
Add contacts in SurveySparrow based on Segment events
Some example use-cases where this would be valuable include:
Combining CX data with product usage data in Segment
Triggering NPS surveys when in-product event occurs (eg: a user completes 10 orders on an e-commerce app)
Updating new customer contacts in SurveySparrow whenever they are created in the CRM, so they are automatically queued up for onboarding surveys.
In this article, we’ll show you how to set up the Segment integration through the following processes:
1. Open your SurveySparrow account and click the settings icon.
2. Scroll down the left panel and select Apps and Integrations.
3. Click Create a Custom App.
4. Fill in the app details, including name, label, and a short description.
5. Then set permissions for the custom app. For a broad setup, select Select All.
6. Click Save.
7. Copy and securely save the access token from the confirmation screen.
Adding SurveySparrow as Segment Source
1. Log in to your Segment account and navigate to the Catalog section.2. Under the Sources section, select SurveySparrow.3. Click Add Source.4. Enter a source name for your reference.5. Assign a label to limit the access, if needed.6. Click Add Source.7. Copy the Write key and keep it safe to use while setting up the integration in SurveySparrow.
Connecting SurveySparrow to Segment
1. Open your SurveySparrow account and click the settings icon.2. Scroll to Apps and Integrations.
3. In the integrations pane, use the search field to search for Segment.
4. Select the Segment Source item.
5. In the pop-up window, enter both the access token from your SurveySparrow custom app and the API key from Segment. Also, choose your Segment data processing region (e.g., US). Click Save to complete the connection.
Configuring the survey source
1. Open your SurveySparrow account and navigate to the survey you want to connect. Click the Integrate tab at the top of the screen.
2. Use the search box to find the Segment integration. When the Segment Source item appears, click the toggle next to it to enable the integration.
3. The setup screen for Segment will load. Click the Enable integration button to activate Segment as a source for your survey.
Whenever the survey receives a submission, the data will be pushed to the configured Segment Destination. You can now analyze the data in a more familiar analytics tool of your comfort.
Creating survey triggers inside the SurveySparrow Destination
In order to trigger surveys, you will have to add SurveySparrow as a Segment Destination. Follow these steps to do so.
1. Head to the SurveySparrow destination page and click on Add destination.2. For a destination to act, it must receive data from a source. Choose from a list of existing sources. Then click on Next.3. Enter a name for the destination and click Create destination.4. Enter the Access Token from the Custom App created in SurveySparrow, then click on Enable Destination.5. Click on Save Changes. 6. Now the destination is ready. Now to create triggers, click on the Mappings tab, then click on New Mapping.7. Select Trigger Survey in SurveySparrow.8. In the next field, paste the payload.Here’s what a sample payload could look like. Keep in mind that the payload structure could vary based on the source. But you will need a survey, a share type, a specific share channel (channel ID) and a contact (email/number).
Note: To find the survey and channel ID, head to the Distribute section inside your survey and create a new email share or edit an existing email share. The channel ID will appear in the URL after /channels/. The survey ID appears after /survey/.Note: Variables are optional and do not have to be added.
9. Scroll to the 4th section, where you will have to map fields. The payload will automatically create most of the field mappings. When a mapping is complete, you’ll see the value from the payload beneath the SurveySparrow destination field. But sometimes a field mapping might not be automatically completed. You’ll have to click on the source field and choose the correct parameter. For example, here we’ll have to manually map the fields for the Share type and the survey.10. Scroll to the next section to review the mapping. If you’d like to test the trigger, click on Send test event.11. If the trigger is a success, it’s time to save it. Click on Next.12. Enter a name for the trigger and click Save and Enable.13. The destination home screen opens. Here you’ll be able to see all the existing triggers. To disable any trigger, click on the toggle next to it. If you’d like to create a new trigger, click on New mapping.14. To edit/delete the trigger, click on the horizontal 3-dot icon, and choose from the menu options.Note: A trigger only supports one share channel and share type. If it fails, you cannot set fallback conditions, i.e. sending the survey via another channel.
Setting up contact mapping inside the SurveySparrow Destination
1. Inside the SurveySparrow destination, open a new mapping, then click on Create or Update contact in SurveySparrow.2. In the next section, paste the payload.Here’s what a sample payload could look like. Keep in mind that the payload structure could vary based on the source.
3. Scroll to the 4th section, where you will have to map fields. The payload will automatically create most of the field mappings. When a mapping is complete, you’ll see the value from the payload beneath the SurveySparrow destination field. But sometimes a field mapping might not be automatically completed. You’ll have to click on the source field and choose the correct parameter.4. Scroll to the next section to review the mapping. If you’d like to test the mapping, click on Send test event.5. Once it is a success, click on Next.Note: Also check if the corresponding contact has been created in the Contacts section of your SurveySparrow account.
6. Finally, provide a name to the mapping and click on Save and enable.
The SurveySparrow-Segment integration bridges the gap between what your customers say and what they do — automating survey triggers, syncing contacts, and unifying feedback with behavioral data, all in one pipeline. The setup is straightforward, and the impact is immediate. Head over to your SurveySparrow account and make your first Segment connection today.
Feel free to reach out to our community, if you have any questions!