Loading...
  • Customer Experience
    Customer Experience
  • Employee Experience
    Employee Experience
  • Brand Experience
    Brand Experience
  • Product Experience
    Product Experience
  • Core XM
    Core XM

Using Google Analytics with Website Feedback

What's on This Page:


Was this helpful?


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!


About Google Analytics

Google Analytics is a powerful web analytics tool that tracks and reports on website traffic and online behavior patterns. When you combine Google Analytics and Qualtrics Website Feedback data together, you can obtain a holistic picture of your end user’s experience on your websites as well as ensure that you are showing an intercept to the right user at the right time in their digital journey. You can bring together Google and Qualtrics data in a variety of ways depending on your specific needs.

Qtip: For detailed documentation on using Google Analytics, please visit the Google Support site.
Attention: Custom coding features are provided as-is and require programming knowledge to implement. Qualtrics Support does not offer assistance or consultation on custom coding. You can always try asking our community of dedicated users instead.
Qtip: Qualtrics also supports a more advanced Google Analytics integration using custom engineering services. Please contact your Customer Success Representative for more information.

Using Google Analytics Data in Visitor-Targeting Logic

Google Analytics can help you ensure that your intercept is shown to the right user at the right point in their digital journey. By adding targeting logic or action set logic to your intercept with a JavaScript expression condition, you can determine the correct Google Analytics criteria that users must meet before they are presented with the intercept.

Google Analytics Expressions in Targeting Logic

  1. Add an intercept by using guided intercept authoring or by creating a standalone intercept.
    Qtip: Guided intercept authoring will provide you assistance throughout the whole process. If you use the guided setup, you will be prompted to add a creative, connect your survey, and configure your intercept.
  2. On either the intercept targeting-level or the action set-level, add logic.Targeting and action set logic on an intercept
    Qtip: Clicking Add targeting logic adds the logic to the entire intercept, so you don’t have to add the logic to each individual action set.
  3. Drop the first field down.Dropping down the first item in the action set; Website and JavaScript Expression are selected
  4. Hover over Website, and select JavaScript Expression.
  5. Enter the JavaScript expression you would like to use for your logic.Entering in the Google Analytics JavaScript expression logic on the targeting logic
    Example: The logic in the screenshots above, set as “If JavaScript Expression dataLayer[0].contentTitle is Equal to The future of telehealth,” will only allow this intercept to appear to visitors who are on the page set in Google Analytics as “The future of telehealth.”
    Qtip: If you have set up the data layer and the values are available at the time that Qualtrics targeting logic is evaluated, you can use JavaScript expressions such as dataLayer[0].pageType and dataLayer[0].contentTitle.
  6. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To what you specify in the next step.
  7. Enter the value the JavaScript expression should return.
    Example: In the example shown above, the targeting logic is set to “If JavaScript Expression dataLayer[0].contentTitle Equal To The future of telehealth.”Detail of in the Google Analytics JavaScript expression logic in the targeting logic
Qtip: You can work with your web development team or inspect the web page within your browser in order to determine which Javascript expressions you can use for the logic set.
Attention: Qualtrics can only capture or base logic off of the values that are present on the page where the intercept appears. Values that have appeared previously or values that have not yet appeared will not be captured.

Google Tag Manager Expressions in Targeting Logic

You can access the pushed data via the Google Tag Manager expressions. The variable part will be the container id of your Google Tag Manager container. In order to access pushed data, you should use the container-id that is used for the data layer.

Example: In this example, google_tag_manager[‘GTM-W6F8HX’].dataLayer.get(‘contentTitle’) is the container id of the Google Tag Manager that will be used to access the pushed data.Google Tag Manager container with the container IDs available

Once you have validated that the above JavaScript expression retrieves your expected value, you can add it as JavaScript expression targeting logic.

  1. Add an intercept by using guided intercept authoring or by creating a standalone intercept.
    Qtip: Guided intercept authoring will provide you assistance throughout the whole process. If you use the guided setup, you will be prompted to add a creative, connect your survey, and configure your intercept.On either the intercept targeting-level or the action set-level, add logic.
  2. On either the intercept targeting-level or the action set-level, add logic.Targeting and action set logic on an intercept
    Qtip: Clicking Add targeting logic adds the logic to the entire intercept, so you don’t have to add the logic to each individual action set.
  3. Drop the first field down.Dropping down the first item in the action set; Website and JavaScript Expression are selected
  4. Hover over Website, and select JavaScript Expression.
  5. Enter the JavaScript expression you would like to use for your logic.Entering in the Google Tag Manager JavaScript expression logic in the targeting logic
    Example: The logic in the screenshots above, set as “If JavaScript Expression dataLayer[0].contentTitle is Equal to The future of telehealth,” will only allow this intercept to appear to visitors who are on the page set in Google Analytics as “The future of telehealth.”
    Qtip: If you have set up the data layer and the values are available at the time that Qualtrics targeting logic is evaluated, you can use JavaScript expressions such as dataLayer[0].contentTitle and google_tag_manager[‘GTM-W6F8HX’].dataLayer.get(‘contentTitle’).
  6. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To what you specify in the next step.
  7. Enter the value the JavaScript expression should return.
    Example: Here, the targeting logic is set to “If JavaScript Expression google_tag_manager[‘GTM-W6F8HX’].dataLayer.get(‘contentTitle’) Equal To The future of telehealth.”A detail of the Google Tag Manager JavaScript Expression
Qtip: You can work with your web development team or inspect the web page within your browser in order to determine which Javascript expressions to use for the logic set.
Attention: Qualtrics can only capture or base logic off of the values that are present on the page where the intercept appears. Values that have appeared previously or values that have not yet appeared will not be captured.

Passing Google Analytics Data to Qualtrics

Embedded data can capture the values of Google Analytics variables from your site and add them to your Qualtrics data set.

Qtip: Once this data has been passed over to Qualtrics, you can use it with other features you may have access to, such as CX Dashboards and Stats iQ.
  1. On any action, click Options.Options menu dropped down with Embedded Data highlighted
  2. Select Embedded Data.
  3. Type in a variable name of your choosing. This variable name will appear as the name of the embedded data field in your Qualtrics survey data.Embedded Data with the value from JavaScript entered
  4. Select Value from JavaScript as the value.
  5. Enter the value of the JavaScript expression for your Google Analytics variable.
    Qtip: You can work with your web development team or inspect the web page within your browser in order to determine which Javascript expressions to use for the logic set. This expression may look like dataLayer[0].contentTitle or google_tag_manager[‘GTM-W6F8HX’].dataLayer.get(‘contentTitle’).
  6. Click Save.
  7. Select View survey.View survey for the intercept
  8. You will be taken to the intercept’s target survey.
  9. Open the Survey Flow.Survey Flow button in the Survey Editor
  10. Click Add a New Element.Add a New Element and Embedded Data in the Survey Flow
  11. Select Embedded Data.
  12. For the field name, enter in the name you chose in Step 3. Make sure that all formatting of the field name is identical here to the name you set in the intercept options.
  13. Click and hold down Move to drag the element to the top of the survey flow.Embedded data field set to Content Title with the Move button highlighted
  14. Click Save Flow.

Once this is set up, you will have a field in your survey data that stores the information captured from the intercept. You can use this field when reporting within Qualtrics and it will be present when you export your survey’s data.

FAQs