Why are people buying this $50 WordPress Plugin (worth $100) when you can accomplish something extremly simular for free with ONE line of code?
Don’t Waste Money On The Simple Things…
I happened upon DealDotCom last Wednesday Sept 19th (I’m a regular WOOTer as well) and saw they had a spiffy new product: WP Affiliate Pro. This WordPress application looks great and is very useful indeed. I need to give credit to the author for coming up with it in the first place. Its functionality allows you to insert affiliate links into your blog quickly and easily based on existing text found throughout your blog and track its success. It is professionally done and is functional. You defiantly get what you pay for. With a large enough site I’m sure you’ll see a return on your investment. John Chow bought this but that’s to be expected with a site that large. But he too could have gotten it for NOTHING.
If you’re not a very large site…
Here’s the kicker… Its on DealDotCom for $49.88 (which if that’s a deal I’m afraid to ask what it was before hand – UPDATE it was $97). This makes me sad. Why on earth would someone pay almost $50 for that software when you can quickly integrate something similar with ONE line of code.
Granted this single line of code does not offer tracking features, but with the quick creation of a table in mySQL and two or three more lines of code you can easily integrate tracking. Four more lines would give you a nice little reporting page. If I get enough comments (and time) I’ll write that out as well, but for now here’s something you can work with. This example will replace “google” (not case sensitive) with a link to their site in every post on your site. You can replace the link with your affiliate ID to make some income on the referrers or use it with your other affiliate products.
Find: $content = get_the_content($more_link_text, $stripteaser, $more_file);
Insert this below: $content = str_replace(” google “, ” < a href="http://www.robmalon.com/" mce_href="http://www.robmalon.com/" >Google< /a> “, mb_strtolower($content, mb_detect_encoding($content)));
I’m sure you’re going to have more then one replace though so lets put this stuff in an nice array for multiple substitutions:
$patterns = '/ adsense /';
$patterns = '/ google /';
$patterns = '/ ppc /';
$replacements = " <a href=\"http://google.com/adsense\">Adsense</a> ";
$replacements = " <a href=\"http://google.com\">Google</a> ";
$replacements = " <a href=\"http://google.com/adwords\">PPC</a> ";
$content = preg_replace($patterns, $replacements, mb_strtolower($content, mb_detect_encoding($content)));
- Create more replacements by continuing the numeric progression in the array. If you combine some of the tactics from my post on Increasing Affiliate Income – Blindfolding Your Links you will also be able to blindfold those links with your own URL and add in tracking much easier.
- Make sure you have spaces between the outsides in case your word(s) show up in a hyperlink, otherwise it would replace that too. Delete the two spaces in the beginning of the anchor part (It shows up as a link on this post otherwise).
- Remember to escape any additional quotes with a backslash as seen in the example. I cant count how many hours I’ve wasted on forgotten semi-colons and backslashes.
- mb_detect_encoding() may work oddly with different encodings. Especially if your site is in a language other then English. In this case see further details on php.net about what to specify it as.
- This shouldn’t effect your existing links but keep an eye out, I whipped this up in five minutes.
If its not already apparent, I’m cheep and that doesn’t exactly do much for me when it comes to marketing solutions for my projects. But you would be surprised what you can do when you don’t just throw money at the problem – and you learn so much more in the process. This strategy gives me some of the best ideas. More often then not, ideas within ideas are found because of the unique ways you come up with to tackle problems. Besides what would the fun in just paying your way to the top? Dorothy’s yellow brick rode is one of dollars for many these days. Its more fun to impose a “cash crutch” on yourself and find creative ways around the mainstream choices.
I started this blog 2 months ago and readers are steadily climbing faster then expected:
I didn’t spend a penny on marketing or software (not that it wouldnt be smart to). Unless you include server costs, I never spend more then that. But I also run other projects off it so I already had it as a resource. My point is, if you learn enough, theres really nothing you cant do without a bit of time and effort. And sometimes less effort then you would think.
Entrupeners, Subscribe for the lastest tools, tips, and tutorials.