Write a script?

Status
Not open for further replies.

fletcher6490

Junior Member
Joined
Jul 15, 2011
Messages
149
Reaction score
41
I am an affiliate for a company and when someone clicks my referral page, a cookie is put on their computer so that at a later time if they go to the site again I will still be their sponsor if they sign up. My question is, would it be possible to write a script so that when someone goes to my WP site that I created, that same cookie will be put on their computer and if they ever join the company I will show up as their sponsor?
 
If this is possible, I am definitely interested in paying someone to do this for me.
 
If I understand correctly, your referral link goes to a site that you don't own (which places the cookie; we'll call it Site A). You want the same cookie to be placed when someone visits the site you do own (we'll call it Site B). So if someone visits Site B and later visits Site A, you want to show up as their sponsor.

If this is the case, the answer is no. Cookies are stored by domain. One domain's cookie will not affect another domain's cookie. If these two sites were on the same domain, sure, but that is not the case in my assumption of your situation.
 
Last edited:
Only way to do it would require taking control over users PC/browser, since cookies are bidden to domains. Another way would be opening referral page in background at page load.
 
Only way to do it would require taking control over users PC/browser, since cookies are bidden to domains. Another way would be opening referral page in background at page load.

Thanks for the info guys, I wasn't sure if it was possible. I'm intrigued by the idea of opening the page in the background though....
 
Is there a way to do that without it being just a pop up?
 
What would be my best way to do that? I've actually never set up an iframe before
 
Ok, I think I've got it all figured out. I inserted this <iframe height="0" width="0" style="visibility:hidden;display:none" src="http:xxxxxx"></iframe> into the header.php and it seems to be working
 
Ok, I think I've got it all figured out. I inserted this <iframe height="0" width="0" style="visibility:hidden;display:none" src="http:xxxxxx"></iframe> into the header.php and it seems to be working
Well display:none; means it won't load in the user's browser, meaning they will never visit your affiliate link. Best to do visibility:hidden; width:1px; height:1px; and put it somewhere inconspicuous.
 
Well display:none; means it won't load in the user's browser, meaning they will never visit your affiliate link. Best to do visibility:hidden; width:1px; height:1px; and put it somewhere inconspicuous.

I've cleared my cookies and tried my method and it works perfect on my end. I'm going to PM you and have you try it out and let me know if it works for you.
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top