Pergunta

Here's the deal: I do freelancing jobs at odesk.com and I want to track transitions from my profile or the job applications that I left to my personal website.

For clients the url of the job application page is https://www.odesk.com/applications/xxxxxxxxx, where xxxxxxxxx is the id your job application.

So I thought I would just use $_SERVER['HTTP_REFERER'] to retrieve the previous url and take the job application id from it.

But guys from oDesk first redirect you to a page like this: https://www.odesk.com/leaving-odesk?ref=yyyyyyyyyyy. And only then users get redirected to my website.

My question is: is there any way to know from which page (which job application) the visitor of my website came?

Foi útil?

Solução

HTTP_REFERER in this case only tracks back to one page from where you came.

So you can't really on it. For example, when a user clicks an ad on a site which is orginated from OSIpage, quick access application, the http_referrer contains OSIpage as the source page.

But on the other hand, when a user click the ad on the second page, the http_referrer becomes the same site.

HTTP_REFERER is therefore unreliable indeed. It might not be there, it might be forgotten, you just can't trust it if it's for security reasons.

Just try with cookies which gives you better control from where your site originated.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top