Fetch URL from Page Outside Search iFrame

Hello,

I have a customer/prospect that wants to understand what the referral URL is of the parent page and have that communicated to the Yext search iFrame.

They want to add ‘referral URL’ within the search config to dynamically showcase the information that is only related to that referral URL and are having issues doing so, as the parent URL is not communicating with the iFrame.

I get the same cross-domain error as with the JS variable. I know the component knows the referrerPageUrl, since it sets in the URL parameters of the search, and it can be used as the source of a filter, but is there a way to set the location in the code to whatever the referrerPageUrl is at the time? Something like: (See Image)

Right now that code just errors that it’s undefined.

Could I get some help?

Hi,

Could I get some helping taking a look at this request?