NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Code for tracking conversion goals

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-26-2007, 06:13 PM THREAD STARTER               #1 (permalink)
Developer of Estibot
 
estibot.com's Avatar
Join Date: Jun 2006
Posts: 1,937
estibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant futureestibot.com has a brilliant future
 


Ethan Allen Fund Ethan Allen Fund South Asia Earthquake Relief

Code for tracking conversion goals


Hi all,

Since I'm just an aspiring coder, this is probably very 101 for many of you. Nevertheless, thought I'd share this piece of code I made, maybe some will find it useful.

It's a little php file for tracking your site's conversions. Especially for those who are trying to fund their website through affiliate marketing.

The trick is to create a "go" page instead of linking directly to the affiliate sites. This way you can use your own stats program, Google Analytics or whatever, to easily track your affiliate links' performance.
????: NamePros.com http://www.namepros.com/code/366820-code-for-tracking-conversion-goals.html

Create a file called "go.php". Place it in your website's root.

Here is the entire content you'll need in the file:
Code:
<html>
<head>
<title>Redirecting...</title>
</head>
<body bgcolor="#FFFFFF">
<?
$siteurl=$_GET['site'];
?>
<script language=javascript>
setTimeout("location.href='<?=$siteurl?>'", [1000]);
</script>
<!--- Add your google analytics or other stats code here-->
</body>
</html>
Now, in your website, instead of linking to an affiliate program directly, link to the go page.

For instance, if your own website is called example.com and your affiliate landing page is
Code:
http://www.affiliatewhatever.com/myid
Your link should look like this:
Code:
http://example.com/go.php?site=http://www.affiliatewhatever.com/myid
Just add your stats code to where it says on the code, and you should be able to follow your affiliate links' performance very effectively. Of course, it still won't track the actual sales, but you'll get an idea of the clickthroughs.

I also posted this on my blog, but since no one hardly ever reads it, thought I'd post it here so it might get more eyeballs and be of some use to someone

Cheers!
Josh
__________________
FREE 40+ page eBook on Domain Development Download now!

Start Your Own Domain Registration Business! Estibot Reseller Plans
estibot.com is offline  
Old 08-27-2007, 01:15 AM   #2 (permalink)
Senior Member
 
James's Avatar
Join Date: Feb 2007
Location: Australia
Posts: 3,043
James has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant futureJames has a brilliant future
 


Member of the Month
October 2008
Ethan Allen Fund Cancer Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 AIDS/HIV Animal Cruelty Animal Rescue
Moved to Code forum
__________________
Ex-NamePros Moderator.
James is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 07:09 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger