I know that it is possible to get the previous url of the visitor with $_SERVER['HTTP_REFERER'];
but how do I get the source / media that the visitor was before accessing the site?
For example if it came from: Google / Organic, Google / CPC (paid), Bing / Organic, Bing / CPC, Direct / none, facebook / referral, youtube / referral, other sites / >
Thank you for your help