Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I detect the url of where the user is coming from in Javascript/Angularjs?

I want to detect the origin url of an user entering my website (such to perform certain operations later). Can this be achieved using angular?

like image 310
JohnAndrews Avatar asked Jan 21 '16 00:01

JohnAndrews


1 Answers

Are you looking for referrer?

var x = document.referrer;
like image 50
Blakethepatton Avatar answered Sep 22 '22 17:09

Blakethepatton