eBay Geotargetted link script
As an eBay affiliate, one thing that always annoyed me with making links to eBay on my blog or website was the fact that they were links to items or search results for only 1 country. Making links to eBay UK and eBay US on the same page is timc consuming and just a hassle.
So thats why I made the eBay Geotargetted link script!
What with the eBay script do for me?
The script allows you to link direct to the eBay search results for a product using a common URL standard - but it will also detect the location of your visitor based on their IP address and then send them to their nearest eBay store!
This means that US visitors get to view products on eBay US (www.ebay.com) and UK visitors get to see items from eBay UK (www.ebay.co.uk). The same goes for other visitors from different countries.
You get to post 1 link to eBay which contains your eBay Partner Network campaign ID and the script does the rest!
Your eBay cookie gets dropped for the right country and will send your eBay Partner Network profits soaring!
When you buy the script, it comes as a file called go.php so to activate the links, you FTP the file to the relevant place on your domain and then from your blog or website, link using the following URLs:
The xbox+360+GTA4 part is the product you are searching for. Just change it to what you want to search for, separated by + and the script will do the rest.
The link will send the user to their nearest eBay store and show them a search result for "xbox 360 GTA4".
Custom CustomID field
The eBay partner network has a method of allowing you to track where your customers come from by using a field called CustomID. By default, the eBay Geotargetted Link Script takes the URL of the page that the link was clicked on, takes out the messy HTML code and tags and inserts that as the CustomID - up to a maximum of 256 characters.
If you want to use your own CustomID field instead of the referring URL, you can manually enter that information into the go.php file too.
Extending the script further
If you are comfortable with editing your .htaccess file on your hosting provider, you can add this line to further extend the capability of this script:
RewriteRule ^go/([^/]+)?$ go.php?$1 [QSA,L]
This means that any requests to http://www.yourdomain.com/go will be sent to the go.php file, along with the search parameters too. Heres the same Xbox 360 example we used earlier, but with the .htaccess method turned on:
My script even recognizes the need for SEO friendly URLs, so the following link will work too:
You can also rename the go.php to what ever you want! Make the relevant name changes to the line in the .htaccess too (if you want to use that method) and the go.php script becomes something more powerful and unique to your site:
(file renamed to shop.php and .htaccess method with friendly URLs)
(file renamed to recommends.php and not using the .htaccess method)
(file renamed to link.php and using the .htaccess method)
For these examples, we would need to change the .htaccess as follows:
RewriteRule ^shop/([^/]+)?$ shop.php?$1 [QSA,L] RewriteRule ^link/([^/]+)?$ link.php?$1 [QSA,L]
1. You will need a host that supports PHP and you will also need FTP access to your domain to upload the file.
2. Purchase the eBay Geotargetted Link Script
3. Unzip and upload the 3 files via FTP to the root of your domain or blog:
4. Open the go.php file in a text editor and enter your 10 digit eBay Partner Network campaign ID into the line as follows:
$campid = "1234567890";
5. If you want to add your own customID, enter it between the quotes in the line as follows:
$customid = "";
See above for more information on the CustomID field and its usage.
6. Save the file - and start linking!
This script works great with the WordPress aLinks plugin by the way! (The aLinks plugin developers site is down at the moment, but you can grab the plugin here).
The eBay Geotargetted link script also allows you to perform testing and debugging too so you can make sure that it is going to do what you want.
To enable this, edit the go.php file and change the line as follows from a 0 to a 1:
$debug = 0;
Save the file and test a link and you will be shown a page similar to the following, showing debug information:
eBay Linking Script You are from GB - Therefore I am sending to you eBay GB And am using this link: http://rover.ebay.com/rover/1/710-53481-19255-0/1?type=3&campid=1234567890 &toolid=10001&customid=xbox-360-page&ext=xbox+360+gtaIV&satitle=xbox+360+gtaIV
You can also run multiple scripts on your site if you need to use more than one eBay Partner Network campaign ID.
Just save the file as something else and change the script accordingly.
This would be a good way to perform "split testing" or have a site where more than one author could link to eBay using their own Campaign ID.
This script is available to buy for the amazing price of only $9.99!