While would be possible to get the protocol from the referrer, this is a header provided by the browser at its own whim (aka no guaruntee its there, or accurate). On top of that the user would be clicking a link in another program, meaning as far as the browser knows there is no referrer to populate (its the first page visited in that tab/window). What you could do it give a query string value to the URLs appearing in said third party program, and check for its existence.