Hi,
I have an intercept that I am wanting to trigger on exit intent, however not after the customer has successfully submitted a website form. The challenge is that the URL does not change after the form is submitted.
I have tried to limit the pop-up from triggering to only when certain text is visible on page, however this doesn't seem to be working correctly.
The Javascript expression I was entering in the targeting criteria is below
document.body.textContent.includes("First name")
With the criteria of the above expression equal to True.
Can anyone point out where I might be going wrong? Thank you!
Solved
Using javascript expression in targeting criteria - to target based on text found on page
Best answer by AmaraW
Hey there! One of our product managers contacted me, thinking you may be running into an issue because the text isn't seen on the page when the Qualtrics code is loaded. According to the product manager, we load our code snippet on page refresh. So, if items are changing after that point, we won't catch them. They provided a couple of options for you to consider:
- Our new Google Data Layer targeting looks for events happening in real-time, and will re-evaluate the code snippet once something has changed on the website. If these points are connected through Google Tag Manager, then this would be the easiest connection. Check out this Support Page >
- API calls can be used to simulate a page refresh on their own once certain events happen on the page, like entering text into a field, etc. Check out this Support Page >
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
