I know cookie can store some information on client machine and it will automatically pop up client's details when the client relog the system.
I tried to think over the way that cookie can access outter websites and get information whether the client has made a purchase or not, but couldnt find a sulotion.
I dont understand how they track a client till the client makes a purchase, even the client makes the purchase the next time with a quote number.
Any of you guys know how the affiliate program tracking work?
Please help me.
Thank you very much
How to track a purchase from a client by cookie?
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
Re: How to track a purchase from a client by cookie?
your question does not make much sence. from what I understood there are 2 websites abc.com and xyz.com . Someone buys something from abc.com and it saves a cookie on their computer and then you want xyz.com to be able to read that cookie? Thats impossible (and would be a HUGE security issue if it was possible).
If you ment that you just want to be able to use a cookie and read the information on the same website then look at setcookie() and use the $_COOKIE super global.
If you ment that you just want to be able to use a cookie and read the information on the same website then look at setcookie() and use the $_COOKIE super global.
Re: How to track a purchase from a client by cookie?
It's not impossible if you control both the domains. You can get the cookie value from abc.com by setting up a series of forwarders. You simply create a page on abc.com that, when the user hits it, takes the value of the cookie and appends it to a URL as a GET variable, and forwards the user again.. egshiznatix wrote:your question does not make much sence. from what I understood there are 2 websites abc.com and xyz.com . Someone buys something from abc.com and it saves a cookie on their computer and then you want xyz.com to be able to read that cookie? Thats impossible (and would be a HUGE security issue if it was possible).
1. User arrives at xyz.com with a cookie set for abc.com.
2. Forward the user to abc.com/cookie.php
3. cookie.php takes the abc.com cookie value and sticks it on the end of index.php .. eg index.php?abccookie=sdfkjnsjkdnfunidviv
4. cookie.php then forwards the user to xyz.com/index.php?abccookie=sdfkjnsjkdnfunidviv
Ta da! xyz.com knows what the value of the cookie set at abc.com is. But you need to control both domains, and it'll only work for stuff where the cookie value doesn't need to be secure.
Re: How to track a purchase from a client by cookie?
Ok. let me put it straight.onion2k wrote:It's not impossible if you control both the domains. You can get the cookie value from abc.com by setting up a series of forwarders. You simply create a page on abc.com that, when the user hits it, takes the value of the cookie and appends it to a URL as a GET variable, and forwards the user again.. egshiznatix wrote:your question does not make much sence. from what I understood there are 2 websites abc.com and xyz.com . Someone buys something from abc.com and it saves a cookie on their computer and then you want xyz.com to be able to read that cookie? Thats impossible (and would be a HUGE security issue if it was possible).
1. User arrives at xyz.com with a cookie set for abc.com.
2. Forward the user to abc.com/cookie.php
3. cookie.php takes the abc.com cookie value and sticks it on the end of index.php .. eg index.php?abccookie=sdfkjnsjkdnfunidviv
4. cookie.php then forwards the user to xyz.com/index.php?abccookie=sdfkjnsjkdnfunidviv
Ta da! xyz.com knows what the value of the cookie set at abc.com is. But you need to control both domains, and it'll only work for stuff where the cookie value doesn't need to be secure.
There are 3 websites out there.
abc.com is affiliate website contains ads
my.com is my website
xyz.com is the website owns the ads which put on abc.com
A client clicks the ads on abc.com.
The link points to my.com to store some details of the client.
Then the link redirect to xyz.com.
I need to track all routine that the client takes and need to know whether the client has made a purchase on xyz.com.
Will that be possible?
So that means it is not possible to build a cookie cross 3 websites. right?feyd wrote:You can't read cookie data from another domain (XSS aside). So unless they tell you by sending the user or a request back to a url or some other communication, you're out of luck.
There has to be a intergration between mysite and xyz.com.right?
But how those affiliate program tracking system work? Any of you guys knows?