SyntaxFix
Write A Post
Hire A Developer
Questions
document.referrer is not working always.
You can use:
window.location.origin