With this plugin you can:
- Create simple URL redirects like http://example.com/a/blue-product/ or http://example.com/visit/red-product/.
- Track clicks in your Google Analytics account.
- Reduce load on your server — this plugin handles redirects in a very efficient way.
Requirements: I tested the plugin with WordPress 3.1 and PHP 5.3. It may still work with older versions. Your site must be using pretty permalinks. To get click tracking, your site must be pre-configured with Google Analytics.
How to Use
The plugin menu is found under “Links” in your WordPress admin sidebar.
Simply go to “Add an affiliate link” page (screenshot below). Enter a human-friendly name for your link. Enter the original affiliate link that you get from the vendor. Enter a short link. Click “Add link”.
Now your short link will redirect to your original affiliate link. And when your short link appears on your WordPress site, the clicks it receives will be tracked in Google Analytics.

View this screenshot in a full window
A few things to keep in mind for short links
The plugin will notify you when you try to do something undesirable with your short links, but just in case, here are two things you need to keep in mind:
One:
For performance reasons, your short link must be, at least, two levels.
Bad: http://example.com/level-one
Good: http://example.com/level-one/level-two
Also good: http://example.com/level-one/level-two/level-three
Two:
If you have a web page on your WordPress site whose permalink begins with, say, articles — like http://example.com/articles/7-tips-to-dominate-planet-earth, do not use the word articles as the first level of your short links, i.e. a short link like http://example.com/articles/some-product would be bad.
How Tracking Works
Whenever you enter a new short link, the plugin saves the first level as a “trigger.” For example, in http://example.com/a/product/ the trigger is /a/. The plugin will save as many triggers as you are using in your affiliate links.
Now in your WordPress site, when you link to any page using a URL that has a trigger in it, the plugin will add some JavaScript to your <a> tag to track clicks in Google Analytics.
So, if you have a link like:
<a href="http://example.com/a/product/">affiliate link</a>
The plugin will transform it into:
<a onclick="javascript:_gaq.push(['_trackPageview','/a/product/']);" href="http://example.com/a/product/">affiliate link</a>
And that’s how clicks are recorded in your Google Analytics account.
(Credit: I got the content scanning and tracking code from Google Analytics for WordPress by Yoast. It is my favorite Google Analytics plugin and it is the one I use in combination with Walm.)
This is how the Google Analytics report will look like:

And this is how your affiliate links will be listed inside Walm:

Support
If you have questions, bug reports, or feature requests — post in the comments.
(If you wanna say thanks, I’d really love it if you linked to WinkPress from your site.)
I installed your Affiliate Links Manager Plugin. I think it’d be great for my site.
I’ve been having some problems, though. Whenever I installed your plugin, no links on my site showed up. For instance, say I hyperlinked to our “Contact” page using the anchor text “contact us”. When i look at the website after I’ve updated this, the text simple doesn’t show up and neither does my link.
Why is this? What do I have to fix?
I’m using the “pretty permalinks” already.
Hi Shane, No one has reported such a problem before. It is possible that your issue is caused by another plugin — not Walm. So, deactivate Walm and see if the problem persists.
Hey MK,
Thought I would take a minute and share something I discovered with your plugin bud. I was experiencing the same issue as Shane, in which I spent about 3 hours ( a bit ashamed to admit honestly) trying to figure out why my entire site was not showing any of my INTERNAL site links. Just like Shane the link and text to the link would simply disappear on the live page or post, even though they looked fine in the editor. Spent quite a while trying to figure out as I thought it was something in the template files. I thought, let me try and disable my plugins one at a time and see what happens. Sure enough upon disabling the WALM plugin, bam, all my links show up!!
Mind you I have used this plugin on another site and loved it, so I dug a little deeper. Turns out if you do not have ANY redirects or links setup in the plugin, this is what happens. Maybe it is related to the WordPress version, I don’t know. I am NO programmer:-) I first uninstalled and re installed fresh version of plugin, links again disappeared, then I add a redirect inside plugin’s option panel and bam problem goes away.
Anyways bud, love your plugin so I thought I would take a minute to share so you can give others that may experience this the easy fix……….USE THE PLUGIN!!
Thanks,
JimK
Thank you JimK!! I was at a mental roadblock trying to figure out what caused Shane’s problem. This problem, however minor and manageable, is still caused by a fault in Walm. I’ll fix it in the next update. Thanks again!
awesome!
i’ll try it right away – i figured it’d be something simple
thanks for the feedback guys!
Does it work with piwik instead of Google Analytics?
Secondly, what I want to track are my ads appearing on other websites while the landing page is on an affiliate website.
On my site I have mysite.com/wordpress/out/aff1 and it redirects to affiliate.def.com. If I use mysite.com/wordpress/out/aff1 in the ad on xyz.com, will it track the traffic going from xyz.com to affiliate.def.com ?
Hi Raza, No, unfortunately it’s not possible to use Walm to track ads appearing on other sites — even if the ads are yours. For the link to be tracked it must appear on the same site where your Google Analytics Javascript snippet is loaded. And Walm only works with Google Analytics. It doesn’t support piwik or any other analytics solutions.
Hi there,
I am loving Walm, however it looks like it doesn’t like hyphens!
When I put in an “original link” that has a hyphen in the domain name, I receive the error “Your original link doesn’t look like a real link”.
Any thoughts?
Hi Jase, I just tried with a link that contains hyphens and it worked fine. I’ll email you to discuss what the problem could be…
Turns out it’s a bug in some older versions of PHP that’s preventing URL validation from working properly. Newer versions of PHP should work fine.
Looks Nice ! Will Check it
I don’t want to use Google Analytics. Do I still have to use a minimum of 2 levels?
Hi Paul, The use of two levels is for performance reasons. It helps the plugin query your database faster to find the original destination of the short link quicker. So, the answer is yes, you need two levels even if you don’t want to use Google Analytics for tracking.
I have a question on the plugin. I want to allow someone to post an ad on my blog and have the ability to track how many times that ad was clicked on. This looks like it will do that but want to confirm this plugin do what I need? Also I saw a plugin called “pretty link lite” is that the “pretty permalinks” you reference in the instructions above?
Thank you
Hi Joe, You can use Walm to track clicks on links that are created with Walm. For example, go to Walm’s “add link” screen and make a short link for your ad, say,
http://joeswebsite.com/johns-ads/product-name/. Now whenever John uses that link within your site, Walm will track the clicks.Pretty permalinks and the Pretty Link plugin are two different things. No, you don’t have to use the Pretty Link plugin.
Trying to use WALM and the affiliate links I made on my site to be shortlinks .. are on : http://www.archcitywebs.com/wordpress/index.php?page_id=103
The MBAM link you see on that page gets a 404 error when clicked
http://www.archcitywebs.com/wordpress/al/mbam/
when it should link to :
https://store.malwarebytes.org/342/?affiliate=7722&scope=checkout&cart=29945
I must be missing something, or its not working for me.
Thanks
PS, also noticed one would not want the Google Analytics Plugin Running at the same time as the Analytics Code plugin from Qualtiy Point, or you end up duplicating your stats.
Ron, you need to be using something other than the default permalinks.
With your current permalink setup, WordPress doesn’t see requests outside of the directory where it is installed. That’s why no plugin will be able to handle requests going to, say, http://www.archcitywebs.com/wordpress/not/real/directory/.
I’m afraid the only solution is to switch to pretty permalinks.
That’s not to say it’s impossible to accommodate default permalinks users, but default permalinks aren’t very popular. And switching to pretty permalinks can provide other SEO and functionality benefits.
For example, with pretty permalinks, you’ll be able to handle 404 errors with plugins. Currently, you can’t do that.
Thanks for bringing this up. I’ll update Walm information to list “pretty permalinks” as a requirement.
Does this plugin give you the ability to turn particular keywords into the affiliate link like the ninja affiliate plug in?
Nope, Walm doesn’t do this. I used to love this feature in other plugins but after having actually used it, I found myself not liking it so much. If you must have it though, try the free version of SEO Smart Links.