0

I have users clicking unique, shortened URLs that redirect to a general URL. For example, "referralURL.com/asdf" would go to "generalURL.com". I want to reference the unique URL.

window.location.href would give me "generalURL.com", but would document.referrer give me "referralURL.com/asdf" if I were to assign it to a variable?

mdb
  • 229
  • 5
  • 16
  • 2
    Possible duplicate of [Will a 302 redirect maintain the referer string?](https://stackoverflow.com/questions/2158283/will-a-302-redirect-maintain-the-referer-string) (This question doesn't specify how the redirect is done in this case, but the dupe target I linked includes discussion of several other redirect methods besides a 302) – Daniel Beck Jan 02 '19 at 22:13
  • Thanks Daniel, I'll check out that question – mdb Jan 02 '19 at 22:21

0 Answers0