| | #1 |
| Ambitious Warrior War Room Member Join Date: 2012
Posts: 98
Thanks: 11
Thanked 8 Times in 6 Posts
|
Hi Guys, I would like to pass keyword referrer info through an iframe. Basically, I have a form which I have to iFrame on a website however; if I just iframe the form, the keyword referrer doesn't jump the iframe and I get lead/info without any referrer related to it. For instance, using this code I am able to capture the title of the page the lead came from: PHP Code: Thanks for your help guys! |
| |
| | #2 |
| Advanced Warrior War Room Member Join Date: 2006 Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
|
You can get the referring URL using HTTP_Referer (PHP) and then parse out the referring keyword from that, but it's not very reliable for several reasons. But if you're content with being able to grab that info from only a certain percentage of your visitors (which is all you can hope for), then you can do something like this. Once you have that info, simply echo it out in your iframe src's query string. For example (assuming that you put the referring keyword in a variable name 'keyword')... <iframe src="YourWebsite.com/FormSubmit.php?keyword=<?php echo $keyword; ?>"> Then in the FormSubmit.php code, you would grab the value of the keyword that was passed through the query string... <?php $keyword = $_GET['keyword']; ?> |
| | |
| |
| | #3 |
| Ambitious Warrior War Room Member Join Date: 2012
Posts: 98
Thanks: 11
Thanked 8 Times in 6 Posts
|
Thank you Brandon. In your opinion is there a more inclusive way to get keyword referrers and send them to the iFrame? |
| |
| | #4 | |
| Advanced Warrior War Room Member Join Date: 2006 Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
|
So no matter what language you use to get the referrer, it's never going to be 100% reliable. | |
| | ||
| |
|
| Bookmarks |
| Tags |
| iframe, info, keyword, pass, referrer |
| |