Create custom segments within Google Analytics
Our Google Analytics integration will allow you to automatically create Google Analytics events with your survey response data. Grapevine Surveys will send events directly into your Google Analytics account each time a user views or responds to your survey. For this integration to work, you will need to have Google Analytics already set-up in your store.
The implementation of this feature requires zero coding skills, however, if you're using Google Tag Manager, then further set-up required, an overview of which can be found in our article Sending events to Google Analytics using Google Tag Manager.
Quick Links
- How to enable Google Analytics for a survey
- Event data sent to Google Analytics 4 (GA4)
- Handling event data from multiple surveys
- Analysing Survey Data in Google Analytics
- Need any help?
How to enable Google Analytics for a survey
You can enable Google analytics via the Integrations page. Click on the More details button within the Google Analytics card:
On the next page, click the Enable Google Analytics Integration button:
The page will update to show that the integration has been enabled and that no further configuration is required:
Once enabled, Grapevine Surveys will begin sending the event data directly into your Google Analytics account when triggered:
Event data sent to Google Analytics 4 (GA4)
Please Note:
Depending on when you created your survey, you will either have a multi-question capable survey or our legacy single-question only survey. Surveys created before January 10th 2024 are legacy single-question only surveys. Anything created after that date will automatically be a multi-question capable survey (even if it only contains a single question).
Legacy single-question survey events
We fire 2 events into Google Analytics for our legacy single-question surveys. The first event is fired when the survey is viewed and the second event is fired if/when the survey is submitted:
Survey viewed event
This event is fired when the survey is presented on the page:
gtag('event', 'survey_viewed', {
'survey_name': {{survey_name}},
});
Survey response event
This event is fired when the survey is submitted:
gtag('event', 'survey_response', {
'survey_name': {{survey_name}},
'survey_type': {{survey_type}},
'answer': {{answer}},
});
Multi-question survey events
There are separate GA4 events for multi-question enabled surveys. Some events will fire more than once if the survey contains multiple questions:
Survey viewed event
This event is fired when the survey is presented on the page:
gtag('event', 'survey_viewed', {
'survey_name': {{survey_name}},
'survey_code': {{survey_code}},
});
Survey response event
This event is fired when the at least one question in the survey is answered by the respondent:
gtag('event', 'survey_response', {
'survey_name': {{survey_name}},
'survey_code': {{survey_code}},
});
Survey question answered
This event is fired after each answer is provided:
gtag('event', 'survey_answer', {
'survey_name': {{survey_name}},
'survey_code': {{survey_code}},
'question': {{question.text}},
'question_code': {{question.code}},
'answer': {{answer}},
});
Survey completed
This event is fired if the respondent gets to the last question in the survey and answers it:
gtag('event', 'survey_completed', {
'survey_name': {{survey_name}},
'survey_code': {{survey_code}},
});
Event variable values
The variables that we send within the above events are based on your survey's settings and the answers provided by survey respondents:
Legacy single-question survey only variables
survey_type - There are 3 types of survey within our legacy single-question survey. The possible options are:
- Fixed response
- Open text
- NPS
answer - In the case of a legacy single-question survey, the answer is directly related to the survey as a whole. It's value will be answer that has been provided by the respondent to the single question in that survey. In the case of a fixed response question, it will be the value of the dropdown or radio box selected. In the case of an open text survey, it will be the text entered by the respondent. In the case of an NPS question, this will be the numerical value of the rating submitted.
Multi-question enabled survey only variables
survey_code - Each survey has it's own unique Survey Code. The code can be found at the top of the page when viewing the survey report within the Grapevine Surveys app:
question.text - This is the text that you have configured as your question to the respondent:
question.code - Each question in a multi-question enabled survey has it's own unique code. The code can be found at the bottom of the question when viewing the survey report:
answer - In the case of a multi-question enabled survey, the answer is directly related to a question and it's value will be answer that has been provided by the respondent. In the case of a fixed response question, it will be the value of the dropdown or radio box selected. In the case of an open text survey, it will be the text entered by the respondent. In the case of an NPS question, this will be the numerical value of the rating submitted.
Variables shared by legacy single-question and multi-question enabled surveys
survey_name - This is the name that you have given to your survey within the Grapevine Surveys app. The survey name is not visible to the respondent.
---
For the Google Tag Manager equivalent events, see Sending events to Google Analytics using Google Tag Manager.
Handling event data from multiple surveys
If you have multiple surveys published across your different sales channels all pushing events into Google analytics, then you will need a way to group and analyze the responses and impressions for each survey.
Each Grapevine survey has a unique Survey Code which allows you to create a segment for each survey that you have published:
Analysing Survey Data in Google Analytics
Once you've enabled the Google Analytics integration, you will start to see the events being pushed into your GA account.
To view them, go to Behaviour > Events > Top Events and search through the list until you find your survey.
You can then click through to that event to view the Viewed Survey and Submitted Responses events.
You can then use the GA secondary dimensions to take a closer look to see where those responses are coming from, what devices are being used to submit them and what the gender split is on responses and much more!