Skip to main content
Loading...
Skip to article
  • Qualtrics Platform
    Qualtrics Platform
  • Customer Journey Optimizer
    Customer Journey Optimizer
  • XM Discover
    XM Discover
  • Qualtrics Social Connect
    Qualtrics Social Connect

Using Google Analytics with Website / App Insights


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!


Qtip: If you don’t have access to any of the features described on this page, reach out to your Account Executive. For more information about the differences between Digital Feedback and CustomerXM for Digital, see Digital Feedback vs. CustomerXM for Digital.

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 / App Insights data, 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.

The Google Analytics Data Layer can be used for real time targeting and embedded data capture. As soon as a value within the Data Layer is updated, Qualtrics will automatically re-evaluate the intercept targeting logic. This allows Qualtrics to reload as soon as values are updated without having to wait for the next page load.

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. For detailed documentation on the Google Data Layer, please visit the Google Data Layer Support Page.
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 XM Success Manager for more information.

Integrating with Google Data Layer

You must have access to both Google Data Layer and Google Tag Manager to use this feature.

To use the Google Data Layer with Qualtrics, you will have to give Qualtrics information about your Google Container ID. This can either be added by a Brand Administrator within Organization Settings so it applies to all Website / App Insights projects, or it can be added to a specific intercept project.

Adding the Google Container ID within Organization Settings

These steps can only be performed by a Brand Administrator.

Attention: Google Container IDs added here will apply to every Website / App Insights project. If there are differences between what is entered here and within an intercept project, the value from the project will be the value that’s used.
  1. Get the Google Container ID for your organization from your Web or Analytics team.
  2. Navigate to the Admin tab.
    adding google tag id within org settings in admin tab
  3. Select Organization Settings.
  4. Click Projects.
  5. Enter your Google Container ID within the Google Tag Manager Container ID textbox in the “Website / App Insights “ section.

Adding the Google Container ID within an Intercept Project

  1. Get the Google Container ID for your organization from your Web or Analytics team.
  2. Navigate to your intercept project.
  3. Go to the Settings tab within your project.
    accessing the intercepts section from the settings tab of an intercept
  4. Go to the Intercepts section.
  5. Scroll down to the Browser Storage section.
  6. Paste your Google Container ID in the Google Tag Manager container ID text box.
  7. Apply your changes.

Using Google Data Layer Variables 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 Google Data Layer condition, you can determine the correct Google Analytics criteria that users must meet before they are presented with the intercept.

Qtip: Only the latest key values that were pushed to the data layer object are used to evaluate intercept logic. For example, if the key-value pairs {"currentPage": "shoppingCart"} and {"currentPage": "checkOut"} are pushed to the data layer in this order, then querying the data layer object for the key “currentPage” will return “checkOut,” the latest value pushed for this key. If you would like a different value to be returned, then push that key-value pair again to the data layer.

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.Add logic is step 2; both the intercept targeting logic and action set logic buttons are indicated
    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 Google Data Layer are selected
  4. Hover over Website, and select Google Data Layer.
  5. Enter the name of the Data Layer variable you would like to use for your logic.Entering in the Google Analytics Data Layer variable logic on the targeting logic
    Example: The logic in the screenshots above, set as “Data Layer variable “contentTitle” 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.”
  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 Data Layer should return.
    Example: In the example shown above, the targeting logic is set to “Data Layer contentTitle Equal To The future of telehealth.”Detail of in the Google Analytics google data layer variable 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 Data Layer variables you can use for the logic set.

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 dataset. 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.

Qtip: Only the latest key values that were pushed to the data layer object can be added to your Qualtrics dataset. For example, if the key-value pairs {"currentPage": "shoppingCart"} and {"currentPage": "checkOut"} are pushed to the data layer in this order, then querying the data layer object for the key “currentPage” will result in “checkOut,” the latest value pushed for this key. If you would like a different value to be returned, then push that key-value pair again to the data layer.
  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.Adding embedded data from a Google data layer value
  4. Select Google Data Layer as the value.
  5. Enter the value of the Data Layer 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 values are available within the Google Data Layer.
  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 in the target survey
  10. Click Add a New Element.Adding an embedded data element 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.Specifying embedded data and moving the element to the top; Apply button is indicated in the bottom right
  14. Click Apply.

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