How can I get HTTP_REFERER?

Anonymous
Not applicable

How can I get HTTP_REFERER?

How can I get HTTP_REFERER on my Landing Page?
Tags (1)
3 REPLIES 3
Anonymous
Not applicable

Re: How can I get HTTP_REFERER?

Add <script> var ref = "<?php echo $_SERVER['HTTP_REFERER']; ?>"; </script>

for php or

<script> var ref = document.referrer; </script>

for javascript
Anonymous
Not applicable

Re: How can I get HTTP_REFERER?

PHP code doesn't work on landing pages, document.referrer returns nothing.
Anonymous
Not applicable

Re: How can I get HTTP_REFERER?

Hi Vladimir

Exactly it doesn't work.
So I tried Marketo token {{lead.Original Referre}}, It work fine at IE11.
But at Chrome and Safari, token returns nothing.

Add Text and Tokens to a Landing Page
https://community.marketo.com/MarketoTutorial?id=kA250000000Kz3lCAC