Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Pass custom query Param in URL Destination

jayashar
Level 1
Level 1

Hi Adobe Team,

We have a need to pass the parent page URL as a custom query param in our URL destination. Our URL destination is fired from within the iframe dest5.html that is injected by Adobe on the parent page. We have tried capturing the referrer URL on server side but for all the requests received on server side for URL destination it logs referrer as dest5.html since URL destination is fired from dest5.html. Is there a way to pass the parent page's URL as a query param in our URL destination ?

Below are some of the options we have tried but it doesnt populate the referer URL value

https://our.site.com/pagename?queryParam1=queryParam1Value&queryParam2=queryParam2Value&rnd=randomNumberValue&ref=%h_referer%

https://our.site.com/pagename?queryParam1=queryParam1Value&queryParam2=queryParam2Value​​&rnd=randomNumberValue&ref=document.referer

1 Accepted Solution
Varun_Kalra
Correct answer by
Community Advisor
Community Advisor

Hi there,

I believe that is not allowed when your main page url and ifram URL are different.

Still you can check if that is possible by using some JS. I searched and found following few external resources:

javascript - Access parent URL from iframe - Stack Overflow

html - Passing a specific url query param from main url into the iframe url - Stack Overflow

html - How do I capture a url parameter from parent page and send to an iframe using Javascript? - S...

Let me know if it works for you or not.

Thanks,

Varun Kalra

View solution in original post

1 Reply
Varun_Kalra
Correct answer by
Community Advisor
Community Advisor

Hi there,

I believe that is not allowed when your main page url and ifram URL are different.

Still you can check if that is possible by using some JS. I searched and found following few external resources:

javascript - Access parent URL from iframe - Stack Overflow

html - Passing a specific url query param from main url into the iframe url - Stack Overflow

html - How do I capture a url parameter from parent page and send to an iframe using Javascript? - S...

Let me know if it works for you or not.

Thanks,

Varun Kalra

View solution in original post