How can I get HTTP_REFERER? | Community
Skip to main content
January 19, 2015
Question

How can I get HTTP_REFERER?

  • January 19, 2015
  • 3 replies
  • 1322 views
How can I get HTTP_REFERER on my Landing Page?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

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

for php or

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

for javascript
January 19, 2015
PHP code doesn't work on landing pages, document.referrer returns nothing.
January 20, 2015
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