n1concepts Posted July 9, 2011 Share Posted July 9, 2011 Does anyone have examples or recommended books / manuals on how to configure Conversion Tracking Code using PHP? Note: I'm trying to figure out a way to handle conversion tracking WITHOUT the use of cookies. I want to setup tracking on visitors - per affiliate - but control when the actual "goal" is reached and/or keep that visitor's IP info to re-establish their eventual conversion to the original affiliate once a specified goal (sale) is reached. I know Google analytics and some affiliate apps do this but I'm trying to custom code something - just to see how it's done. Any examples or recommendations (PHP code only please) appreciated. thx! Quote Link to comment https://forums.phpfreaks.com/topic/241534-examples-of-conversion-tracking-code-php/ Share on other sites More sharing options...
gizmola Posted July 20, 2011 Share Posted July 20, 2011 Using IP's has lots of problems, since IP's for many users change frequently, and IP's are shared. If you don't have a problem with that, then you simply need a simple database table that associates a visitor you've begun tracking with an IP address. You get the IP from the environment in most cases using $_SERVER['REMOTE_ADDR']. One thing that might be helpful is to pair the IP with at least a part of the user agent string which can also be gotten from $_SERVER. The truth is, that people use cookies and/or url parameters because that is what works. Using IP's as a supplement is ok for some things, but it just isn't a good way to try and uniquely identify someone beyond the context of a short period of time. Quote Link to comment https://forums.phpfreaks.com/topic/241534-examples-of-conversion-tracking-code-php/#findComment-1245321 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.