search
top

How To Stop Bots From Ruining Your EPN EPC

Yesterday, I found myself excited as I saw my EPN clicks shoot past 50, then past 100, then less excited after 200, and absolutely livid after 400. I was getting scraped and they were following all of my EPN links driving my once very respectable EPC right through the floor. I made a hearty $4.00US yesterday because some stupid idiot wanted to scrape my scraped content. Here is the solution I came up with if you use Auction2Post: Javascript. We’re going to use a sneaky little piece of script to keep bots from finding our EPN links.

Step 0: Download the inline javascript plugin for wordpress. It puts js into posts if you surround it with [inline][/inline]. Epic win.

Step 1: Log into your WordPress Admin, and go to your Auction2Post settings and hit “Templates”

Step 2: Make a copy of your A2PDefaultTemplate to edit.

Step 3: Go to your EPN panel and go to the link generator and make a link for a specific Item in your specific campaign. I like to break everything up into campaigns so I know when one of my sites is tanking.

You’ll end up with a link that looks like

http://rover.ebay.com/rover/1/xxx-xxxxxx-xxxxxx-0/1?icep_ff3=2&pub=5837811825&toolid=10001&campid=5336402342&customid=&icep_item=300350920861&ipn=psmain&icep_vectorid=2293432&kwid=902099&mtid=824&kw=lg

Step 4: Now, back in your template you’re going to want to use the template tag to get the Item number. Throw in a little javascript magic (SURROUNDED BY [inline][/inline])!!) and you have:

<script type="text/javascript">
var item = "[itemID]";
var first = "http://rover.ebay.com/rover/1/711-xxxxx-xxxxx-0/1?icep_ff3=2&amp;pub=xxxxxxxxxx&amp;toolid=10001&amp;campid=xxxxxxxxxxx&amp;customid=&amp;icep_item=";
var last = "&amp;ipn=psmain&amp;icep_vectorid=xxxxxxxx&amp;kwid=xxxxxxx&amp;mtid=824&amp;kw=lg";
var url = first+item+last;
document.write('<a href="',decodeURI(url),'">Click HERE TO BUY</a>"');
</script>

Add this to your template where you’d otherwise have regular links.

If you have a template installed that uses synopsis plugins like limit-post.php you’ll likely need to edit the plugin because it strips out script tags. My template used limit-posts.php and all I had to edit was:

 $content = strip_tags($content,'<a>');
to
 $content = strip_tags($content,'<a>,<script>');

So what kind of protection does this afford us? Let’s see.

  • The url is never in complete form, so we don’t have to worry about regex matches.
  • The URL doesn’t live in the <A> tag, so we don’t have to worry about scraping there.
  • The url isn’t put together until the user clicks. Bonus.

Hopefully this will help against the most common bots running around ruining our days.

6 Responses to “How To Stop Bots From Ruining Your EPN EPC”

  1. Drew says:

    Have you added the .htaccess code to block the spiders from your sites ebay links?

    Hit me up on email if you need the list.

  2. Nobody says:

    Awesome stuff man. Is there any way to continue to mask your urls while incorporating this, or is that one thing you have to give up?

  3. Interesting post. Have you checked to see if you’re passing referrer with this technique? I’ve been hearing there are sometimes issues with this when using JS.

    h

  4. Terry says:

    Josh,

    This is quality man… found it on WF.

    Do you know if the link trick works w/php bay? I was thinking about it and don’t see why it wouldn’t.

  5. Josh says:

    You can indeed edit the PHPBay templates to use this method. Heads up though, they just changed the PHP templates this morning because eBay changed the linking structure.

  6. Terry says:

    Can you clarify more on the templates? If I’m running an older PHPBay am I not using the proper linking structure?

Leave a Reply

Your email address will not be published. Required fields are marked *

top