XM Directory Segments for Digital Intercept Targeting
What's on This Page:
About XM Directory Segments for Digital Intercept Targeting
XM Directory allows you to target the display of website intercepts to specific segments of users, as well as obtain segment- and journey-specific insights. With the combination of the XM Directory and Website Feedback, you can engage with your highest-value customer segments for specific experience measurements. Every time your intercept is displayed to your visitors will be saved on your visitor’s touchpoint timeline in XM Directory.
Setting up Segments for Intercept Targeting
Once you’ve created segments in XM Directory, you can use them across Qualtrics in many of the same places that mailing lists and samples can, including with Website Feedback.
- Create an Intercept on an existing or new Website Feedback project.
Qtip: If, instead of creating a standalone intercept, you’d like assistance throughout the whole process, feel free to use our guided setup for Website / App Feedback projects. If you use the guided setup, you will be prompted to add a creative, connect your survey, and configure your intercept. For more information about the guided setup, visit Choose How You Want to Collect Feedback.
- Navigate to the Intercept Options.
- Enable “Link with XM Directory” by selecting the checkbox.
- Pick the directory that contains your segments.
Qtip: You can also control intercept display frequency with the Contact Frequency Rules feature. To set this up, see XM Directory Contact Frequency for Digital Intercepts.
- Return to your Intercept editor, and add targeting logic that contains your XM Directory segment.
Example: For example, XM Directory Segment Is High-Value-Users.Qtip: Test the intercept using the Bookmarklet both with contacts that are in the segment and with contacts that are not in the segment. During testing, you’ll have to mimic the setting of the External Reference ID within your browser so Qualtrics can identify the contact. See Testing the Use of Segments for Intercept Targeting for more information.
- On your website where you will launch the intercept, specify the JavaScript expression that will be evaluated in the user’s logged in session to obtain the External Reference ID for the contact. This External Reference ID is used to look up the visitor in the XM Directory and track if they’ve seen your intercept. See the below section for more details on the JavaScript expression.
JavaScript Expression for Retrieving Reference ID
To make sure your intercept is obeying your segment targeting, you will need to specify the JavaScript expression that is evaluated in the user’s logged in session to obtain the External Reference ID for the contact.
The logic below passes the externalReference ID of the user to Qualtrics to associate the website visitor with a contact in XM Directory. Put this code snippet on page load, making sure that the value of the ID has been retrieved at this point:
if(typeof QSI === "undefined") {
QSI = {};
QSI.config = {
externalReference: extRef
};
}
Testing the Use of Segments for Intercept Targeting
Before launching your intercept, you should test it to make sure the display based on segment targeting has been implemented correctly.
In your real deployment, your site visitor’s External Reference ID will be available in the context of their logged session through a JavaScript expression or a cookie.
The below steps allow you to perform an end to end scenario using test data and web browser workarounds.
- In your XM Directory, create a new contact and specify a unique Reference ID for that contact.
Example: We’ll be using aaa123 as our example Reference ID. Any time you see the ID number in these steps, replace it with the Reference ID you specified.
- Follow the steps in the Setting up Segments for Intercept Targeting section to configure an intercept to follow segment targeting.
- Go to Test Intercept.
- Drag the bookmarklet to your Browser Bookmarks bar.
- Go to a web page that you want to use for testing.
- Go to the Developer Console. Depending on your web browser, you’ll reach it differently:
- Google Chrome: In the Chrome menu bar, go to View → Developer → Developer Tools. In the window that appears, go to the Console
- Apple Safari: Ensure the Develop menu is enabled for Safari. To do this, go to Preferences → Advanced → Show Develop menu in menu bar. Click Develop in the Safari menu and select Show Web Inspector. In the window that appears, go to the Console
- Mozilla Firefox: Click the menu icon and then select Web Developer. In the Web Developer menu, select the Console
- Microsoft Edge: In the menu bar, go to Tools → Developer → Developer Tools. In the window that opens, go to the Console
- Internet Explorer: Click the Gear icon and select Developer Tools. In the window that opens, go to the Console
- In the Console menu, type this expression and then press Enter:
UserID="aaa123"
Qtip: aaa123 is our example Reference ID value and should be replaced with the value you assigned to the contact in step 1. - Paste the JavaScript snippet below to set up the externalReference JavaScript variable to be your JavaScript expression.
if(typeof QSI === "undefined") { QSI = {}; QSI.config = { externalReference: UserID }; }
- Press Enter.
- Click the bookmarklet and you will see that the segment targeting will be appropriately honored to determine if the intercept should or should not be displayed.
Qtip: For security purposes, the targeting logic line that includes the segment will only include the segment ID. To match a segment ID to a segment name, navigate to XM Directory and edit your segment. The URL will have the segment ID, which is bolded in the following example URL: https://dxdemo.co1.qualtrics.com/iq-directory/#/POOL_2QRmx18nJXf6kuR/segments/SG_1hHhxvjX3PAZ34k
To repeat these steps for additional testing, please do the following between tests:
- Refresh your browser each time.
- Set up the Javascript expression within your Console.
- Run your bookmarklet again.
Troubleshooting Tips
A new user was added to segments, but doesn’t see an intercept that was targeted at their segment.
Segments are rebuilt daily in XM Directory. Therefore, there is a possibility the new user was not yet accounted for as a member of the segment.
The intercept debugger window does not show segment names.
For security reasons we do not show the segment name in the debugger window for any targeting logic that has segments. We will show the segment ID. To map a segment ID to the segment name, edit your segment in XM Directory and look at the URL. The URL will have the segment ID, which is highlighted in the following example URL: https://dxdemo.co1.qualtrics.com/iq-directory/#/POOL_2QRmx18nJXf6kuR/segments/SG_1hHhxvjX3PAZ34k
Alternately, you can directly open up an Intercept and examine the targeting logic to see what segments are being targeted.
The intercept is slow to show up for first time users.
For performance reasons, we temporarily store segment membership in-memory and only update it as needed. If a user is not yet in our temporary storage, then that user’s intercept may take a bit longer to display initially.