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!
AussieQualtricsUser - your code should work correctly if you are evaluating the javascript expression is equal to 'true' instead of 'True'. Can you confirm if that is not the issue here?
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 >
Thank you Mishraji - this solved the Javascript expression. So simple, but I'm a Javascript dummy here haha. Appreciate your input.
Thanks very much AmaraW - yes you're exactly right. The single page application has been giving us headaches getting our use case to work. The input you've provided is really helpful, and gives us some options to explore.
Thanks all the for assistance.
https://community.qualtrics.com/XMcommunity/discussion/comment/47823#Comment_47823So glad we were able to help!
As far as I can tell, the documentation does not specify this so I could be wrong. It looks like the JavaScript condition you input is going to be evaluated as a string. If you’re returning a true or false value (or anything else that isn’t a string) you’ll need to convert it to a string in the expression.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.