Tracking your survey allows you to analyze respondent behavior and target your audience better, to optimize your survey campaigns.
Introduction
Privacy Considerations
Tracking solutions like Facebook Pixel, Google Tag Manager and Google Analytics 4 collect user data such as browsing behavior and interactions, which can be classified as personal data.
Hence, it is crucial to transparently inform the user what data is being collected and how it will be processed, then obtain explicit user consent before collecting or processing any personal data.
In alignment with data protection regulations, if you wish to enable tracking integrations, you are expected to either explicitly ask for consent or inform users of their option to opt-out on the first page of the survey, or include this information in the privacy policy presented on the first page of the survey. We assume you fulfill the above mentioned obligations on the first page. Consequently, tracking of respondent actions will begin only after they click the “Next” button on the first page, as this click is considered an agreement to proceed. By activating any tracking integration on your survey, you acknowledge that the legal liability for informing respondents and obtaining necessary consents lies with you, the survey creator.
Testing
Zurvey.io only activates tracking integrations on live surveys, so preview and test survey fill outs won’t trigger any events. If you want to test if your integration is successful, we suggest sending in answers and then resetting your survey once you confirm tracking is working as expected.
Events and parameters
During tracking, Zurvey.io sends 4 custom events to help you understand your respondents’ survey journey:
- ZurveySurveyNext
- Triggered when “Next” pagination button is clicked
- ZurveySurveyPrev
- Triggered when “Previous” pagination button is clicked
- ZurveySurveySubmit
- Triggered when user reaches the default closing page type after clicking on the “Submit” button
- ZurveySurveyDisqualified
- Triggered when user reaches a disqualification page based on some condition
All these events have various metadata parameters to help you identify individuals for later re-targeting:
- recordId
- The same ID you will see in your Zurvey.io exports. One respondent within a session has the same record id throughout the survey fill out. If you want to make sure that record IDs are unique by respondents, see Single Responses and Resumable Survey Filling settings.
- surveyUniqueName
- Your survey’s Custom Survey ID comes in handy if you channel different survey tracking data into the same analytics tool.
- fromPage
- Added for ZurveySurveyNext and ZurveySurveyPrev events to identify the exact progress of users or even survey dropout points.
- toPage
- Added for ZurveySurveyNext and ZurveySurveyPrev events to identify the exact progress of users or even survey dropout points.
- disqualificationPageTitle
- Added for ZurveySurveyDisqualified event to identify which disqualification page was shown to the user after disqualification.
- If your survey has URL parameters, each one will have its own event parameter with the prefix “zurveyParam-”. For example, if you have a “user_id” URL parameter, you will see a “zurveyParam-user_id” among your events.
- For embedded surveys, don’t forget to set the URL parameters in your embed settings.
- For surveys shared via Zurvey’s Audience Campaign feature, audience member ID, campaign ID and wave ID will be automatically added.
You can find your tracking integration settings on your survey’s publish page.
Facebook Pixel
If you are using Facebook to share your surveys, Facebook Pixel is an obvious analytics tool to track your respondents’ activity. It enables you to create audiences based on the results for re-targeting for your next campaign.
However, Facebook Pixel tracking will not function on devices running iOS 14 or later due to changes in the privacy policy of iOS 14 regarding the App Tracking Transparency framework. Please be aware that this may lead to incomplete data collection and less accurate tracking if you only configure this integration.
To embed your survey with a Facebook Pixel to enable Facebook tracking, first you need to acquire your Pixel ID. Go to Meta Business Suite / Ads Manager / All tools / Events Manager.
Here you can find your already existing Facebook Pixels and their IDs under Data Sources.
If you want to create a new one, click on Connect Data Sources on the left-hand menu (green ➕ icon), choose “Web” as data source type. When it prompts for a website URL, provide your survey URL without the query parameters (e.g. https://s.zurvey.io/test-survey). Make sure to choose the connection type as “Meta Pixel only” since Zurvey.io doesn’t support the Conversations API yet. Once you finish setting up the new data source, you will be able to retrieve your Pixel ID.
Copy and paste this value to your Zurvey.io tracking setting.
Once connected, new survey responses will automatically be monitored and events will appear on your Meta Events Manager shortly. The interface might prompt you to confirm the custom events as your own to proceed, so make sure not to block them, otherwise you won’t be able to see the survey tracking results.
Metadata such as Sampled Activities and event parameters can take up an hour to show. You can access them in your Event Details from the Overview.
You can use custom conversions to filter events with parameter rules to segment your survey respondents for detailed reporting or ad targeting. For example, if your survey has a URL parameter for the subscription package, you can create a custom conversion to only target premium users.
Facebook Pixel tracking automatically works with embedded surveys as well.
Google Analytics 4 (GA4)
Google Analytics 4 is a powerful web analytics platform replacing Google Universal Analytics. Unlike its predecessor, GA4 adopts an event-driven data model that allows for detailed tracking of user behaviors and interactions, enabling marketers to gain deeper insights into how users engage with their content. Furthermore, the new data model and enhanced tracking capabilities reduce the necessity of using Google Tag Manager to send events and handle standard tracking.
In order to track your survey respondents’ interactions in Google Analytics 4, you will need a data stream measurement ID. You can find your data streams via Analytics’ Admin page (cog icon on bottom left) / Data Collection and modification / Data streams. If you have multiple streams set up, choose the data stream where you would like to see the survey interactions reported. Expanding the stream details, you will find the Measurement ID starting with “G-”.
Copy and paste this value to your Zurvey.io tracking setting.
New survey responses are now automatically tracked, and custom Zurvey.io events triggered by respondents appear on the Reporting / Real-time overview immediately.
Please keep in mind that for fully processed and aggregated data in standard reports, there can be a delay of several hours up to a day, depending on various factors like data volume and report complexity. Once data is processed, you will be able to see event details on the Reporting / Engagement / Events dashboard.
In order to see not only the events themselves but also the custom parameters in your standard GA4 reports and dashboards outside of the Events view, you should register them as Custom Dimensions in Admin / Data Display / Custom definitions. Custom dimensions also serve as filters to be able to segment your data.
The Dimension name will be shown on your Analytics dashboard, the Scope should be “Event” and the Event parameter should be the Zurvey.io custom parameter name (or an already defined GTM variable). Since reporting can be negatively impacted by custom dimensions with many unique values, make sure to only set what you really need.
If you channel all your survey tracking under one data stream, it might be a good idea to add surveyUniqueName as a custom dimension to be able to filter to certain surveys at a time.
Please note that by default, GA4 tracking doesn’t work with iframe solutions such as Zurvey.io’s survey embed, due to limited access between the parent (the website) and the embedded frame (the survey).
So, if you have an embedded survey in your website that you would like to track, additional setup is required. In case of embedded surveys, Zurvey.io forwards the tracking events (e.g. ZurveySurveySubmit) to the parent, where an event listener is needed to retrieve and send these events to GA4 via the gtag script built in the website.
<script>
window.addEventListener('message', function(event) {
gtag('event', event.data.event, event.data.properties);
});
</script>
Since this requires extra website development, we suggest using Google Tag Manager as an event handler for embedded surveys instead.
Google Tag Manager (GTM)
Google Tag Manager is a versatile tool used by marketers as a central point of data collection and tracking code management for different sources. By adding scripts (“tags”) to your website with GTM, you can change the tracking setup, triggers and events on the interface without having to update the website source code with every modification. Based on your setup, the data collected can be channeled into various analytics tools like Google Analytics, Facebook Pixel and more.
Zurvey.io provides direct and automatic reporting to Google Analytics 4 and Facebook Pixel without having to set up anything on these sites as described above, while with GTM, you need to define your events and triggers on the Google Tag Manager interface. Integrating your survey with all three tools and using GTM to push events to GA4 or Facebook can lead to duplicate tracking and redundant data collection. Hence, we suggest using GTM only if your end analytics tool is different from these two, or if you wish to have more control over which events and what data is channeled through, as it all needs to be set on Google Tag Manager for correct behavior.
To connect your survey with Google Tag Manager, you will need your container ID. You can find it on the very top of your Tag Manager container workspace.
Copy and paste this value to your Zurvey.io tracking setting.
Using GTM tracking, even though your survey and the Tag Manager are now connected, you won’t see the events in your analytics tool automatically: you need to set them up.
1) First, you need to set all the custom Zurvey.io event parameters - called Variables - that you want to use in GTM. You can create a variable for all of them or only the ones you need.
In the Variables / User-Defined Variables section, click on “New” to set up these variables. The Variable Type should be Data Layer Variable and the Data Layer Variable Name should be the Zurvey.io metadata parameter name (e.g. recordId, surveyUniqueName). You can name the variable itself anything you want.
2) Next, set up the Triggers relevant to you. Each trigger should handle one custom Zurvey.io event if you wish to differentiate them on the analytics side as well.
In the Triggers section, click on “New” to set up a new Trigger. The Trigger Type should be “Custom event” and the Event name should be the Zurvey.io event name (e.g. ZurveySurveyNext, ZurveySurveySubmit).
By default, these triggers are activated on every custom event happening. However, you can configure them further: for example, if you have a URL parameter called “source” and you would like to create separate tags for survey respondents of different sources, you can create different triggers for that.
You need a variable for the source URL parameter:
Then you can configure your trigger to only fire if your source matches a certain value. It can come in handy for example when you wish to channel data from a Facebook source to Facebook Pixel, while channeling data from other sources to Google Analytics. Or, if you want to have a different trigger for each survey, you can add a surveyUniqueName variable condition to your triggers.
3) Finally, you need to configure how the already set up variables (metadata) and triggers (events) should be handled.
In the Tags section, click on “New” to set up a new Tag. There are numerous Tag Types you can choose from based on your needs.
For example, you can send data to Google Analytics in a customized way. If the custom Zurvey.io events or parameters contain information you don’t want to expose to Analytics, this is how you set that up: create an event called MonthlyCVSurveyPagination, and add record id (from recordId parameter) and page (from fromPage parameter) event parameters with both the next page and previous page event triggers just for this one survey (previously described surveyUniqueName trigger condition).
With this setup, you will see the event defined by you on the Google Analytics dashboard.
If you don’t find a suitable Tag Type, you can always choose Custom HTML which allows you to use scripts from the analytics tools you use. If you want to configure your survey’s Facebook Pixel configuration in an advanced way, this is how you can achieve that.
Please note that by default, GTM tracking doesn’t work with iframe solutions, such as Zurvey.io’s survey embed, due to limited access between the parent (the website) and the embedded frame (the survey).
If you have an embedded survey in your website that you would like to track, additional setup is required. In case of embedded surveys, Zurvey.io forwards the tracking events (e.g. ZurveySurveySubmit) to the parent where an event listener is needed to retrieve and send these events to GTM via the script built in the website.
If your website is already equipped with a GTM script, head to the Tag Manager interface. First, create a Trigger for the website page where the tracking events are expected to occur. For example, if a survey was embedded into the https://zurvey.io/test subpage, the trigger would look like this:
Next, to ensure that the tracking events are caught and forwarded to Google Analytics, you need to create a Custom HTML type Tag with the previous trigger and the following code:
<script>
window.addEventListener('message', function(event) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(event.data);
});
</script>
Optionally, you can add a limitation to the script to secure that only surveys from Zurvey.io are allowed to trigger this tag:
<script>
window.addEventListener('message', function(event) {
if (event.origin !== 'https://s.zurvey.io') { return; }
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(event.data);
});
</script>
This solution works only for GTM because the gtag command, used for direct GA4 event handling, is not fully supported in custom HTML tags.
If your website does not have GTM installed yet, you need to add it first. You can find the script on the Tag Manager’s Admin page under Install Google Tag Manager. For the embedded survey tracking to work, it’s enough to add it to the page(s) where the survey appears.