Jump to content

Examples of Conversion Tracking Code - PHP


Recommended Posts

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!

  • 2 weeks later...

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. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.