[ad_1]
Anyone know a simple Javascript code to do a conditional redirect? For example, redirect to one url if the link came from Twitter and a different one for Facebook then with anything else it loads as normal? The plugins I have found don’t seem to work in this situation.
[ad_2]
Hi,
You can use the “document.referrer” ([https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer]) to get the visitor’s previous URL and then apply the conditional logic for redirection.