Integrating feedback surveys with Google Analytics

Integrate Feedback with Google Analytics

Feedback forms provide an excellent opportunity to understand what your site visitors think about your product. With these insights, you can improve the experience, which will lead to better conversion rates. If you are curious about response and open rates of your survey, Insight Stash offers a simple integration into analytical tools like Google Analytics or Adobe Marketing Cloud. In this article, we will cover how to get open and submit rates of your surveys into Google Analytics reports. This type of reporting is useful when you are trying to optimize the visibility of feedback forms.

Integrating Insight Stash feedback forms with Google Analytics is a simple process. Let's go through it in steps.

Google Events

Google Analytics offers a simple and powerful custom tracking options for your site. You can tag any type of interaction on your pages like clicks, email submissions or feedback submissions. If you already have google analytics on your pages, you can use custom conversion tracking provided by the platform.

Firing conversion event is simple, and comes in the below form:

ga('send', 'event', 'Videos', 'play', 'Fall Campaign'); 

This is a JavaScript function, which when executed sends information back to google servers and adds it to your reports.

For our purposes we will need 2 conversion events:

  • Feedback open
  • Feedback success submit

Tagging our form with the above 2 events will allow us to get form opens and submissions. With these, we will be able to calculate open rates and submission rates for feedback forms on the page.

Let's use below values for our feedback form tracking.

ga('send', 'event', 'Insight Stash Feedback', 'Open', 'Main Survey');  
ga('send', 'event', 'Insight Stash Feedback', 'Submit', 'Main Survey');
  • send - Indicates this is a send command.
  • event - Is a hit type.
  • Insight Stash Feedback - Is the name of event category. You can use your own event categories.
  • Submit - Is our chosed event type. We can easily put "Feedback Submit" or "Form Success" in here. Select a value that makes sense for your reporting.
  • Main Survey - We have decided to pass name of the survey for which the custom event is sent. If you use only one survey per page, this value might be redundant for reporting purposes.

First event will be used to track feedback form opens and second - submits. Feel free to use your own values for eventCategory, eventAction, and eventLabel fields.

For more information on Google Analytics events consult with official documentation:

Build a feedback form

Next, we will need to add conversion events to our feedback form. Log into Insight Stash admin panel and create a survey you would like to tag with Google Analytics events or select a survey you already have.

Insight Stash feedback forms can fire custom JS code on every survey open and successful submission. In order to tag our feedback form with Google events we created above, we need to insert code into 2 fields: "Execute on Survey Open" and "Execute on Survey Submit". These 2 fields allow us to enter custom JS code, which will be fired on those 2 feedback form actions. Custom JavaScript events for Feedback Form

Be careful with the code you enter, since the code will be executed on survey pages.

Once you have entered your tracking events into the fields, don't forget to save the survey and make sure it is live.

Testing integration

Let's test our Feedback events in the browser to ensure our code sends events back to google. In order to do that make sure your survey is live (we would advise first launching a survey on a test page, or setting "Fire Rule" to manual and opening survey with "stash.generateSurvey()" code). This will ensure that your test survey is not exposed to live audience.

Open the page with Insight Stash feedback form in google chrome, and enable developer tools by pressing "F12". Select network tab and enter "collect" in the search field to ensure all requests are filtered only for google tags. Now we are ready to test our tag. Developer Console, testing Feedback

Let's open the survey. If our tagging is successful a new request should appear in network tab like below: Feedback Open Google Custom
Event Double check the parameters sent and ensure the response is 200. Feedback Open Google Custom Event

We need to do the same for submission event. Submit the feedback form and you should see another google event in network tab, with a "submit" event value.

If both of the above tests were successful - your feedback form is ready for prime time.

Reporting in Google Analytics.

Once your feedback form goes live you will be able to view reports for it in google analytics when your visitors open and submit responses. Go into Conversions -> Goals report.

You can use the above approach to integrate your feedback forms with other analytical software like Adobe Marketing Cloud, Webtrends, KISS metrics and others.