Are you interested in identifying which changes on your website will have the biggest impact? Have you considered prioritizing UX changes by how much they will impact revenue?
In this article you'll learn how to create a Google Analytics report using Qualaroo data that allows you to sort responses based on the revenue those responders have generated. Here's what it will look like:

By leveraging Qualaroo's Google Analytics Integration, it's possible to identify the UX improvements that provide the most value to your business.
Basically the workflow is as follows: You have a value associated with a customer/user > User sees and responds to a survey > You send the Qualaroo response to Google Analytics as a custom dimension.
There are many use-cases where this type of reporting could be beneficial, but for the scope of this article, let's imagine we want to improve the shopping cart experience of a sample site because revenue is easy to track with purchases.
Step 1 - Create a new Qualaroo survey
Sign in to Qualaroo and create a new survey with a question “How would your experience have been better today?” and select either the single answer or multiple answer options for each of the improvements a user can choose from.
Step 2 - Create a User view in Google Analytics
(If you already have a User view in your Google Analytics property, you can skip this step)
Click on Admin in the sidebar of Google Analytics. Click ‘Create View’ and name it ‘Users View’.
Make sure to turn on the User-ID Reports switch. Accept any terms of service notices and make sure your developer follows them when passing the ID to your analytics.
Step 3 - Use Ecommerce Settings to track revenue (optional)
(Skip if Ecommerce is already turned on for your User view, or if you track revenue some other way)
While you’re in the admin section of your Google Analytics account, click the Ecommerce Settings. If your website doesn't sell anything, the Ecommerce settings aren't necessary. Learn more about collecting and analyzing purchase data with Google Analytics.
Note: The idea here is not that your site must be an Ecommerce site, but rather, by connecting revenue to UX research, your team will be able to demonstrate ROI as well as make better decisions based on the feedback you collect.
Turn it on and save:
Step 4 - Set up a Custom Dimension for Qualaroo Responses
Again, from your Google Analytics admin page, look in the property column and click on Custom Definitions > Custom Dimensions
Click New Custom Dimension and call it Feedback Given and set the Scope to User.
Step 5 - Add some necessary Qualaroo API code
We need to send our response data to Google Analytics, which will require pushing to the Data Layer via a Qualaroo event handler when a response is submitted.
In a separate tag that will fire after your Qualaroo snippet, or just after your snippet in the same GTM tag, you can add the following:
_kiq.push(['eventHandler', 'submit', function(answers_array, nudge_id, question_id){
if (nudge_id != 52 && question_id != 121) return; // Bail if this isn't the question
window.dataLayer.push({
'event': 'qualarooResponse',
'qualResponse': 'Survey #' + nudge_id + ' - ' + answers_array[0].question + ' ' + answers_array[0].answer
})
For simplicity of the example, this addition went in the same custom HTML tag where the Qualaroo snippet was:
What is the code doing?
When a user submits a response, we’ll check that the survey is the one we care about tracking in this way. Furthermore, we have also added a check for the question ID. We are doing that because a user scope custom dimension (like we’ve set up in GA) will overwrite the value we’ve saved for the user. ***We need to be very careful not to overwrite responses saved at the user level in GA, especially if you run multiple surveys at once.
If our survey ID and question ID match, the above code pushes an event with a variable called qualResponse. We’ll set up a trigger for this event in the next step so that this variable gets picked up for sending to GA.
Step 6 - Create GTM Triggers
In GTM, click the Triggers tag, then the ‘New’ button. Fill in the event name to be whatever makes sense for you. We did the following:
While we’re here, let’s make another one that we’re going to need (skip this if you’re already tracking purchases or value of customers). Click ‘New’ again and add this:
Step 7 - Create GTM Tags
We’re also going to need some new tags for the events above (only one if you’re already handling purchase/value related events!).
Go to the Tags tab and click ‘New’.
Set the type as a Google Analytics tag, and fill in with the following:
Don’t forget to add your trigger at the bottom!
If you set up the purchase event in the previous step:
Add another one called Transactions and set the trigger.
Step 8 - Data Layer Variables
You’ll notice we’re using Data Layer variables in this example. Let’s set them up by clicking on the ‘Variables’ tab. In the User-Defined Variables section, click ‘New’. We need to create one called Response and one called User ID (if you don’t have the user ID variable already).
Step 9 - Give your developer what they need (only if you aren’t already tracking purchases or user IDs)
For the transactions element to work in the way we’ve set up, we need to push purchase events to the Data Layer. That can be done with the following, just test that the values being set are what you expect:
dataLayer.push({
'event': 'purchase',
'transactionId': '1233455667',
'transactionAffiliation': 'Acme Clothing',
'transactionTotal': 44.55,
'transactionTax': 1.29,
'transactionShipping': 5,
'transactionProducts': [{
'sku': 'A930B32',
'name': 'Best Shirt',
'category': 'Apparel',
'price': 44.55,
'quantity': 1
}]
});
Note: The above will need to be run once the transaction has already completed.
For User ID, here’s some code to run IF the User ID is known:
dataLayer.push({'userId': '939291'});
Step 10 - Create a Custom Report in Google Analytics
This is the last step, we are almost there!
Go back to Google Analytics, then in the sidebar navigate Customization > Custom Reports > New Custom Report. (You’ll probably need special permissions to do this, so if you don’t have edit abilities, get with someone who can help you out).
We called our report “Value of feedback received.” It looks like this:
And with that nifty report, we can sort my improvement options by revenue per user, as well as see how many users have answered that way. From our test, you’ll see that number of responses definitely does not align with the value of the response givers to my store. In this case, Improvement 5 would be the thing this store should focus on.
Conclusion
This is a very basic example that we hope not only demonstrates practically how to integrate Google Analytics and Qualaroo for making better decisions from survey insights, but also gets your brain firing for other possibilities that might exist for your company or use case.
For example, what if Lifetime Value was a custom metric in your GA account which could be used to track the change of LTV before and after a particular survey was run and changes implemented? That, in addition to the above, could bring new ROI capabilities for your UX research efforts to show strong correlations between research and improved company KPIs.
If you have a topic you'd like us to write about, or need anything at all, reach out ot us at support@qualroo.com!
Comments
0 comments
Article is closed for comments.