Jump to content

Tracking who purchases through affiliate links on my site


Tom497
 Share

Recommended Posts

Hi, I have been working on creating a website through Wordpress and up until now I have not needed to do any programing. I am very new to making websites and have not done any programing in my past. A little about my site: I am putting affiliate adds (banners and text links) on my site which direct people to merchants sites. I have signed up for most of the affiliate programs through affiliate networks like Linkshare.com, Cj.com, avantlink.com, etc. My site also has an area for people to sign in/register, which is powered by the Wishlist Member plugin. What I am trying to figure out: I need to be able to track users that purchase something through any of the adds I post on my site. From the research I have done the easiest way to do this is through some form of Sub ID in the URL. The links (banner/and text html) that I post on my site are given to me from the affiliate networks in the following format. Commission Junction:<a href="http://www.cj.com/click-000000000-000000000?sid=default" target="_blank">000000 - Shared hosting</a><img src="http://www.cj.com/image-00000000-000000000" width="1" height="1" border="0"/> LinkShare<a href=””http:cick.linksynergy.com/fs-bin/stat?id=/FYI6fQ9PWs&offered=7097.10000015&type=3&subid=&u1=default””>LinkShare Referral Program</a><img src=””http://ad.linksynergy.com/fs-bin/show?id=/FYI6fQ9PWs&offered=7097.10000015&type=3&subid=0> Avant link:ref="http://www.avantlink.com/click.php?tt=ml&ti=119085&pw=121063&ctc=default Google Affiliate Network:http://gan.doublecli...0000000000&mid=default I am hoping there is a way to put a variable in the adds code (taking the place of “default” in the example adds above) so that when a user signs into my site (through the Wishlist member plugin) “default” is replaced with the username they signed in with (if they don't sign in then have it stay "default"). I know where the database is that collects the member registration info and I know where I need to put the code in the add but am not sure what code goes there. The affiliate networks said it can be coded with PHP or JavaScript, which would be easier to use? What part of php or JavaScript do I need to learn to be able to do this? Any help you guys can give me to point me I the right direction would be much appreciated. Thanks,Tom

Link to comment
Share on other sites

There's some information here about using PHP to figure out if anyone and who is logged in: http://codex.wordpress.org/Function_Reference/get_currentuserinfo Like most of WordPress' code, this too makes use of global variables and other things that may cause problems, but that's the way WP does it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...