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

Website Conditions


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 Website Conditions

Sometimes you have more information stored about a visitor that you would like to use in your logic. In this section, you will learn about Website conditions. These conditions can be based off cookie values, Javascript Expressions, HTML on the site, and more.

Adobe Analytics

Adobe Analytics can be used to display a creative based on the value of Adobe Analytics variable. In order to use this condition, the website needs to be integrated with Adobe Analytics beforehand. For more information, see Adobe Analytics Extension.

To set an Adobe Analytics condition

  1. On either the intercept targeting-level or the action set-level, add logic.
    The Add Intercept Display Logic button to the top-left of all action sets, and the Change/Add Logic button inside each and every action set
  2. Drop the first field down.First field is dropped down, Website is highlighted, and Adobe analytics is selected from this menu
  3. Select Website, and then select Adobe Analytics.
  4. Select the variable type.
    Second field dropped down to reveal variable types
  5. Select the variable.
    Selecting a Custom Variable form the third dropdown in adobe analytics logic
  6. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To what you specify in the next step.
    Condition says if Adobe Analytics Conversion Variable Custom Evar6 is equal to Browse, the Creative will appear
  7. Enter the value of the variable.

Value from Cookie can be used to display a creative if a cookie stored on the visitor’s browser contains a value that you specify. For example, if you store a cookie called Return Visitor equal to True if the visitor is a return visitor and False if the visitor is a new visitor, you could choose to target only those who are returning visitors.

Qtip: Browser security restrictions limit Website Feedback to only seeing the cookies saved by your website. Cookies stored by other websites will not be accessible.
Attention: Website Feedback, and other client-side scripts, cannot read cookies with the “HttpOnly” attribute set. See this page for more information.
Warning: Custom coding features are provided as-is and may require programming knowledge to implement. Our support team does not offer assistance or consultation on custom coding. You can always try asking our community of dedicated users instead. If you’d like to know more about our custom coding services, please contact your Qualtrics Account Executive.

To create a Cookie condition

  1. On either the intercept targeting-level or the action set-level, add logic.
    The Add Intercept Display Logic button to the top-left of all action sets, and the Change/Add Logic button inside each and every action set
  2. Drop the first field down.
    First field of Adobe Analytics logic is dropped down, from the Website menu Cookie is selected
  3. Select Website, and then select Cookie.
  4. Enter the name of the cookie you would like to use for your targeting.
    The condition says the Creative will appear if Cookie return visitor is equal to true
  5. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To the value that you specify in the next step.
  6. Enter the value the cookie should include.

Event Tracking

With event tracking, you can listen for specific events on your website beyond which pages the visitor has seen. Events might include visitor actions like downloading a monthly statement on a banking website, clicking to chat with a live agent on a commerce site, and more.

For how to set Event Tracking up, see the linked support page.

To create an Event Tracking condition

  1. On either the intercept targeting-level or the action set-level, add logic.
    The Add Intercept Display Logic button to the top-left of all action sets, and the Change/Add Logic button inside each and every action set
  2. Drop the first field down.
    First field of Adobe Analytics logic is dropped down, from the Website menu Event Tracking is selected
  3. Select Website and choose Event Tracking.
  4. Enter the name of your event.
    The condition says the Creative will appear if Event Tracking checkout event is greater than or equal to 1
  5. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To the value that you specify in the next step.
  6. Enter an event value, which will be the number of times the event must happen for the participant to qualify. In this example, the creative will show for visitors who have completed the “checkout_event” event one or more times.

HTML on Site

HTML on site conditions can be used to read the HTML of the page and display a creative if an HTML element contains a value that you specify. For example, if you wanted to target visitors who have two or more items in their shopping cart, you could use the ID of the shopping cart element to base your logic on if that element contains a number larger than or equal to 2.

A page with a shopping cart link and a screenshot of the console with the Javascript needed to create that icon

In this example, we’ve determined that we want to show a creative if there are 2 or more items in the shopping cart. Looking at the HTML for this button, we’ve determined that the ID of the HTML element containing the number of items in cart is qty-in-cart.

Qtip: If the element you need to target doesn’t have an ID attribute and you aren’t able to add one, consider targeting this element using the JavaScript Expression condition:

document.getElementsByClassName('qty-in-cart')[0];

For example, If the shopping cart had no ID but had a class=“qty-in-cart” and it is the first element with this class on the page, then this JavaScript expression could be used to target it.

To create HTML on Site condition

  1. On either the intercept targeting-level or the action set-level, add logic.
    The Add Intercept Display Logic button to the top-left of all action sets, and the Change/Add Logic button inside each and every action set
  2. Drop the first field down.
    First field of Adobe Analytics logic is dropped down, from the Website menu HTML on Site is selected
  3. Select Website, and then select HTML on Site.
  4. Enter the ID of the HTML element you would like to use for your targeting.
    The condition says the creative will appear if HTML on Site quantity in cart is equal to 2
  5. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To what you specify in the next step.
  6. Enter the value the HTML should include.

JavaScript Expression

This condition can be used to display a creative depending on the value of a JavaScript expression. Often websites will store information about their visitors in JavaScript variables. For example, a variable might store whether the visitor is a current customer or a potential customer.

In this example, a variable called navigator.language stores visitors’ language settings. This intercept will show a creative if they are using their browsers in English.

Qtip: Not sure what data are available on your website through a JavaScript expression? Check with your web team.

To create a JavaScript Expression condition

  1. On either the intercept targeting-level or the action set-level, add logic.
    The Add Intercept Display Logic button to the top-left of all action sets, and the Change/Add Logic button inside each and every action set
  2. Drop the first field down.
    First field of Adobe Analytics logic is dropped down, from the Website menu Javascript Expression is selected
  3. Select Website, and then select JavaScript Expression.
  4. Enter the JavaScript Expression you would like to use for your logic.
    The condition says the Creative will appear if Javascript Expression navigation language is equal to English U.S.
  5. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To what you specify in the next step.
  6. Enter the value the JavaScript Expression should return.

Google Data Layer

This condition can be used to display a creative depending on the value stored within a Google Data Layer. Often websites will store information about their visitors in Data Layer variables. For example, a variable might store whether the visitor is a current customer or a potential customer. Qualtrics can reload as these variables are updated, allowing for real-time targeting.

In this example, a variable called navigator.language stores visitors’ language settings. This intercept will show a creative if they are using their browsers in English.

Qtip: Not sure what data is available on your website through a Google Data Layer? Check with your web or analytics teams.

TO CREATE A GOOGLE DATA LAYER CONDITION

  1. On either the intercept targeting-level or the action set-level, add logic.
    adding logic to an intercept
  2. Drop the first field down.
    adding google data layer variable logic
  3. Select Website, and then select Google Data Layer.
  4. Enter the Data Layer variable you would like to use for your logic.
    google data layer logic
  5. Indicate whether you are targeting visitors whose value is Equal To or Not Equal To what you specify in the next step.
  6. Enter the value the Data Layer variable should return.

FAQs