Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

affiliate software creation. how to get vars from advertiser



9:36 am on Nov 29, 2013 (gmt 0)

5+ Year Member

I am creating a basic and small program in php like cj and linkshare. its not that big and complicated.

But I need to know about the logic how it actually gets to know if the sale is completed or not on advertiser's website once the affiliate's url is clicked?

Appreciate the suggestions and advices.



3:06 pm on Nov 29, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


you need to insert a bit of code on the confirmation page, e.g.
<img src="https://www.example.com/affiliate_sale_tracker.php?var1=&var2=&var3=">
where var1, 2 and 3 contain for example the order number, the total amount and any other var you wish to record.

you'll also need to have some sort of check to ensure that each order number is only credited once to each affiliate.

i've done this myself and use the software on our own site. however... it is difficult and you also need a backend for affiliates to check sales and it must be rock solid and secure - otherwise you'll never get affiliates to trust you.

all big companies use js script tag instead of php in img src, because js is platform independent. on my own server i am able to use php, so i used the method above.

good luck


3:32 pm on Nov 29, 2013 (gmt 0)

5+ Year Member

Thanks for your reply.

To understand better, example.com will be the domain where my affiliate program is running?

Also the var1,2 and 3 etc. how do I get the values from advertisers' site? Do I have to ask them to pass those variables from their site?

Thanks again for your help.

Featured Threads

Hot Threads This Week

Hot Threads This Month