Affiliate Links Manager for WordPress

walm25With 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

where-to-find-walm-menuThe 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.

Demo image

View this screenshot in a full window

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:

google-analytics-report

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

walm-aff-links-list

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.)

Download

Download from WordPress.org »»

82 comments

  1. Richard

    Thank you for this fine peace of affiliate software. After some basic changes by a representative of Host provider to my .sql, I realized that affiliate link manager stopped working.

    My configuration ::
    - Shared hosting
    - I requested some help to get the www. prefix before my domain names
    - Hostgator rep. changed 2 setting in my .sql database ::
    * wp_options – > Siteurl and
    * wp_options – > Home
    from http://domain.com to http://www.domain.com

    Thats it. My wish granted.

    However since that day, my goal conversions within google analytics aren’t being measured anymore. I tried uninstalling your plugin and reinstalling it again, but to no avail. I believe the plugin entries remain in the database. So I guess uninstalling the plugin is not going to help.

    Any suggestions to solve? I don’t have a backup of the .sql as my backups go 10 days back and it was probably about two weeks later that I realized that it wasn’t working.

    Your help is appreciated,

    • Hi Richard, What’s your website?

    • Richard

      That is www.koortslipgenezen.com

    • Which links on this page are supposed to be tracked?

    • Richard

      Well I am using one affiliate link on the page. For instance you’ll find the image “of lees meer” next to the CTA, which anchors “http://koortslipgenezen.com/_/details/”. This link utilizes your plugin.

      Thanks!

    • When you view links within the admin screen of WALM, they display with the “www”, correct? What you need to do is go back to the content of your pages and change the affiliate links to include the “www” and it’ll start tracking again.

    • Richard

      I actually tried that with a test affiliate link, which did include www, before. GA did not track this link either. Seemed like the obvious solution though.

      However, within GA I had set IP filter, which removed hits from my own IP address. Didn’t think about that one. This could have been the reason, why I wasn’t seeing any results from the tests I was doing. I turned the filter off now and will come back to you asap!

    • Richard

      Hi M.K. I tested it. Internal links are tracking within GA. WALM links are not… I rechecked the links and all seem setup in the right manner.

    • M. K.

      Richard, I just checked the source code of your page. The Analytics code snippets are inserted correctly. You should begin to see affiliate link clicks as pageviews in Google Analytics. I noticed that you’re using a plugin called Ninja Google Analytics, which is inserting the tracking snippet in the footer, while the recommended place for the code snippet is the header, actually. Consider switching to Yoast’s Google Analytics for WordPress.

    • Richard

      I actually did get some GA hits on the affiliate links. This was however
      way below the actual number of hits. I have now installed Yoast GA
      for wordpress and hope to some useful results. Ill get back on the results.
      Thanks for your time and insight!

    • Richard

      GA & WALM is working like a charm now. Excellent piece of work!

  2. Willem

    Good evening,

    What is the benifit of this plugin? In your other article you explaine that Google analytics by yoast also can track outbound links?

    Kind regards,

    Willem

    • Willem, Link redirection and tracking combined into one.

    • Willem

      Hope I can bother you again. I looked up the internet what you can mean with link redirection but I can not totally understand what you mean.

      When I put links on my website I want to track how much traffic I generate for that website. So the simple option is to track outbound links with Google analytics plugin from yoast. This will track it as events.

      I think your plugin tracks it like fake pageviews? But in GA plugin by yoast is also this option:

      You do not need to enable this to enable outbound click tracking, this changes the default behavior of tracking clicks as events to tracking them as pageviews. This is therefore not recommended, as this would skew your statistics, but is sometimes necessary when you need to set outbound clicks as goals.

      Is this nog the same like your plugin?

      Hope you can help me out. I want to use your plugin for the commercial links, but I there is no benefit (i understand) it makes no sense to use it.

      Kind regards,

      Willem

    • Yoast’s plugin doesn’t do redirections, and it doesn’t work without a redirections plugin.

      Through a redirection plugin, you can setup a link like “http://yoursite.com/out/product/” to forward to product website. Then you’d tell Yoast’s plugin to track all links that begin with “/out/”.

      Think of WALM as mainly a simple redirections plugin that’s optimized for affiliate links.

  3. Similar to Shane above, posted 6/28/11, we’ve been seeing the exact same issue – internal links not being displayed on the site. However, when we isolated the issue to WALM, we noticed that WALM supports 3.1, and we’ve been upgraded to 3.3.

    Will there be an update to WALM soon to support 3.3 and/or is this issue WP version specific? Disabling WALM fixes the issue, but we would like to get it back up and running.

    Thanks for your help!

    • Nick, The replies to Shane’s comment mention that if you just add one link to WALM, the problem goes away. If you activate WALM without adding any links, it’ll cause problems. It’s a minor bug.

  4. I’m not 100% sure I have this setup correctly… I am not seeing any of the affiliate links inside google analytics…

    We have many reps that are selling our services, and need to track the traffic they generate, and the pages that are clicked on when someone uses their link..

    The first think I’m trying to get working is here: http://wiredsuccess.com/afid/avmarketing1/takethecvi-impactmovie/ it should redirect to here: http://wiredsuccess.com/takethecvi-impactmovie/

    which it does, but then I don’t see anything inside google analytics to indicate that..

    Thanks in advance for helping a newbie!! ;-)

    Chris

    • Hi Chris, The link will only be tracked if it appears on a page that’s part of a WordPress site where the plugin is installed. If a rep gives out this link in an email newsletter, for example, it won’t be tracked. Let me know what page on your site the affiliate links appear.

    • I’m not 100% sure I’m using this correctly…. I really hope this solution will work for me!! What I’m trying to do is have a link that when people “GET” to the site via the link, everywhere that person goes on the site is tracked inside google analytics…

      I have the plugin installed on the site, and I have a link setup:

      I have setup this link that I’m trying to get people to use http://wiredsuccess.com/afid012/avmarketing1/takethecvi-impactmovie/

      It’s setup in your plugin and re-directs to this link: http://wiredsuccess.com/takethecvi-impactmovie/

      it appears to be working correctly, but doesn’t seem to show up inside google analytics…

      Any help would be GREATLY appreciated!! Thank you so much for your help!

      Chris Behnke

    • I put up a quick page that shows some screenshots of google analytics and the URL setup in the plugin…

      thoughts??

      http://wiredsuccess.com/screenshots/

    • Chris, The purpose of the plugin is that if you have affiliate links on your site (as an affiliate marketer), the plugin will track when visitors click on your affiliate links, so that you know how many visitors you send to a vendor.

  5. Hi, I have been using AFM for some time now but today when I add a link to my website http://www.footballbootsreview.com I get the following message: http1 not working. Is this just temporary?
    Thanks

  6. brian

    Hey M.K., great plugin.

    I’ve got a problem though… I use WALM with Google Analytics for WordPress too, but I want to track my outbound clicks with events, like GAW does it. But since WALM uses pageviews, it is overriding GAW’s functionality and my links actually have the pageview tracking code. How can I let GAW be in charge of all my tracking? or what would you suggest to solve my necessity to track clicks with events?

    Thanks

    • M. K.

      Hi Brian, I track everything as pageviews, not events. Events are limited and don’t provide as much information. For example, with Events, you cannot see the navigation path that lead to your affiliate link being clicked. I think you have to set GAW to track outbound clicks as pageviews to get WALM and GAW to work together.

  7. Hi!

    I recently went to the GA to find our tracking, (we use /aff/ as our 1st level) and I didn’t see any hits, even though I know there were a few. After a bit of reading, I have a question.

    Does WALM work in widgets? My affiliate links are 125×125 ads. I know they are clicked on, but I’m not seeing the javascript inserted when I view the site.

    Thanks

  8. Hey, where do I find the tracking info for the links in GA? I can’t seem to find it?

  9. Hey, do you know of any issues with the plugin and not letting images show up in a post? I am having a problem with no images in the post itself, although they still show up in the excerpt. I deactivated all plugins and it ended up being this one, even if all plugins were off besides it. Turn it off and they show up. I use the catalyst theme.

  10. Hi,

    First of all I love your plugin works great and simplifies a lot of headaches. I am glad I found in early on in my website developement as it saved me lots of time and headaches going back and changing all the links.

    My question to you is I would like to add the nofollow attribute to all my href links and i installed a plugin to do this for me but it is not showing up in my code. Does your plugin actually achieve this function for google natively ? I am thinking of uninstalling your plug in and then running the one that assigns the nofollow and then reactivating yours . If I do this will all my old short links be deleted ?

    Thanks in advance. Sorry for my beginner knowledge in this field.
    Jenny

    • Hi Jenny, WALM doesn’t add a nofollow attribute to affiliate links. My own experience with SEO has shown me that worrying about nofollow attribute is unproductive. Almost 99% of links on WinkPress main content don’t include nofollow.

      Anyway, the order of activation, reactivation of plugins shouldn’t matter. You can try uninstalling WALM and see if this allows your other plugin to work.

  11. Just FYI and you may have mentioned this somewhere (?) but until I added my first link, any images that utilize the wp-slimbox 2 plugin “disappeared” from the page. Perhaps it’s because it uses javascript to lookup images and link to a lightbox? Anyways, it works fine after I added the first link to the WALM.

    • Hi Holly, You’re right. No plugin should have such a problem. I will make sure this issue is resolved with the next update. Thanks!

  12. Hi, I use affiliate links manager on one of my websites already and it works great.
    When I added it to the above website, html within my webpage wouldn’t function correctly although everything was ok on the admin side. When I tried to upload it and view the source on the actual site the images and links weren’t showing up. I had to deactivate affiliate links to get the page to view correctly.
    Any idea what the problem could be and why it would work on one of my wordpress sites and not the other?
    Thanks

  13. Antti

    Great work but I have some issues with Tradedoubler links

    Original link form :
    http://clk.tradedoubler.com/click?p(2*******)a(1******)g(1*********)

    After affiliate links manager :
    http://clk.tradedoubler.com/click?p2*******a1*******g1*******

    So brackets are stripped away.

    Do you have any solution or can you advise me what I need to change?

    • Antti, I tried your link on my website (replacing the asterisks with random numbers) and the brackets were fine. Your problem is probably related to your PHP installation being incompatible with the aggressive filtering that WALM performs on links. As stated earlier, I’ll remove the link validation filters on the next update. Until then, I’m afraid there is no solution—unless you wanna go into the database, like Phill, and fix the links manually in there. Thanks!

  14. Hi there. Fantasic plugin. Where can I send you a donation to say thanks?

    I have a problem with the Google Analytics tracking – I can’t get it to work. I have Google Analytics set up and running with the Google Analytica plugin. I have added links into WALM and then created a page with example links in it.

    i.e.: http://www.mydomain.com/uses/roboform

    For some reason the tracking javascript is not added to the links when the page is saved. I simply see the standard link in the page source.

    i.e.:

    <a title="RoboForm" href="http://www.example.com/uses/roboform" rel="nofollow">Roboform</a>

    I’m using the default wordpress editor.

    Do you have any suggestions about why it may not be working?

    Have you had reports of the tracking code insert failing due to conflicts with other plugins?

    Thank you!

    Oh… by the way – the url parser also won’t accept affiliate links that have a subdomain in them. i.e.: http://subdomain.example.com/aff.php?id=1234

    • Phill, I have no idea what’s causing this.

      I added http://mydomain.com/uses/roboform in WALM. Then went to WordPress editor and entered:

      Roboform

      I published the page and when I looked at the source code, I saw:

      Roboform

      The JavaScript code is added, no problem. So, I’m thinking, like you said, there might be a conflict with another plugin you have. But I haven’t had reports of any conflicts.

      As for the affiliate link with subdomain, it should work fine if you have a newer PHP version installed on your server. But I will do away with this buggy parser completely in the next update. I was told that most popular PHP apps avoid using the built-in PHP filters because they’re poorly supported in many web host environments. So, it’ll be the user’s responsibility to make sure their links are well formed.

      Let me know if you get more information on this problem.

      Thanks!

    • Thanks for the fast reply.

      Yes, I suspect that it will be a plugin conflict. I couldn’t disable all the plugins on that particular site as it was already live. I’ll make a backup of it over the next few days and test the plugins then. I’ll let you know what I found out.

      Also strange on the PHP parser. I’m running PHP 5.2.17. Does it require a later version of PHP than that to work? Not a big deal at the moment – I just jumped into phpmyadmin and updated the links directly in the database :)

      Do you have a donate button or paypal address I can send a small donation?

      Thanks again!

    • Oh yeah, going into the database and updating the links, that should work, lol!

      WALM uses a built-in feature in PHP to validate the links, and this feature seems to have had problems around version 5.2.13. The issue you’re experiencing maybe related.

      I’m currently working on content for the membership plugin section, but once that’s done, I’ll get back to fixing WALM. I’ll remove this problematic link validation feature and I’ll add a few other cool features and enhancements.

      Here’s my Donation Link. Thanks a lot! :D

  15. So basically if we club WALM and SEO smart link then we get Affiliate Ninja plugin. Cool.

    Thanks for sharing it.

    • I have Ninja Affiliate, but I use WALM because having accurate click tracking is critical to me. Ninja Affiliate built-in click tracking isn’t reliable.

      Here’s an example of why click tracking is just crucial to any affiliate marketer:

      Last month I sent 150 unique real-human visitors to a vendor and generated 16 sales.

      I’m very confident in these figures because they’re recorded by Google Analytics with the help of WALM. Google Analytics automatically discards clicks from spambots and other web-crawlers, so I know my stats aren’t cluttered with BS.

      Then this month, by the 20th, I notice that I’ve sent 130 unique visitors to the same vendor and generated no sales at all, so I contact the vendor and tell them “guys, last month was 150 uniques, and 16 sales. This month so far, 130 uniques and no sales, what’s up with that?” They reply, “Oh sorry, there was a glitch in our tracking system, here’s the commission for 16 sales and any new sales will now be tracked. Thanks for alerting us!”

      Without accurate tracking, this wouldn’t have been possible.

  16. Alok

    Hi,

    Thanks for creating this wonderful plugin.

    But for some reasons, this doesn’t seems to be working for me. I get a 404 page not found. I tried disabling all the plugins but still no good. I don’t need click tracking, just a redirection.

    Any clues what could be wrong?

    Regards,

    Alok

    • M.K.

      When do you get the 404 error, when you try to follow an affiliate link that’s created by WALM or when you try to access a post on your blog? If it is when you try to access a post, then WALM is not the problem–some other plugin or setting is. If the problem happens when you follow an affiliate link by WALM, then make sure that you have pretty permalinks enabled in WordPress.

    • Alok

      Hi,

      This is happening when I follow the affiliate link.

      I double checked and pretty permalinks is enabled. I am using the /%year%/%monthnum%/%postname%/ format.

      Regards,

      Alok

  17. Hi M K,

    I have the same problem as others have noted here with regards to the links disappearing once the page has been published. I also installed pretty permalinks, but once I did that all my pages just had a 404 error. So I deactivated pretty permalinks, and I still had the same problem. I then deleted the page I was working with, and created a new one, and the page is shows up fine this time, but I still have the same problem with the hyper link not showing up.

    I know you are doing your best to come up with a update that will solve this problem, but could you or Jimk ( if he’s still around) give step by step instructions on how he did what he did to solve this problem please?

    I’ve tried to figure it out for myself, but I can’t.

    I still don’t get why the pretty permalink plugin is needed, and what it does? I know it’s supposed to make the link pretty, but I can’t see why it’s needed with your plugin and I would have thought that your plugin on it’s own would have done this is the permalink structure is set correctly. ( but I’m no programmer…obviously)

    If it should be installed before WALM or after, or if it makes any difference? I’ve tried activating and deactivating the plugins in different orders and still get the same problem.

    If you aren’t able to give me step by step instructions on how to overcome the disappearing hyper links do you have a rough time scale on when a new version of the plugin will be released please?

    Many thanks

    Paul

    • M.K.

      Hi Paul, Thanks for your comment. The Pretty Link plugin is not required. What is needed is what WordPress calls “pretty” permalinks. And you do that in the settings of WordPress (See this page). Sorry about this confusion, I’ll try to re-write the description above to make this clearer.

      As to all your links disappearing upon activating WALM, the solution is simple. At least add one affiliate link and WALM will start to function correctly. If you have WALM installed, but no links added, it will cause the issue of making all your links disappear. Obviously this is another bug that I need to fix in the next release. I really can’t say when exactly I’ll get to releasing a public update for the plugin–maybe in a month, a couple of months, or so…

    • Paul

      Hi MK,

      Thanks for the quick reply. I had actually added four links to WALM and tried hyper linking one in a post when I had the problem. However, things are even worse now because I can’t even get to see if my links will show up because every time I go to post a new page I just get a 404 error.

      I have been changing the permalink structure a few times to see if I could get the bloody thing to work. I’m not bothered about my site ranking for any keywords ( competitive niche, so using paid and other traffic) so I just want the permalink structure to look good. So I was quite happy with /%postname%/, but now that or /%catergory%/%postname%/ or even the later but with year instead of catergory won’t allow my pages to show up. Any ideas on why this is happening, or what I can do would be much appreciated. What a frustrating sunday…wasted. Ah well, if this internet marketing thing was easy, everyone would be doing it:)

      What permalink structure is the best to use for WALM?

      Does it only work with certain ones?

      Many thanks

    • M.K.

      %postname% for permalink structure is fine. WALM is not picky when it comes to permalink structures, you can use whatever you want.

      Your 404 errors could be the result of conflicting plugins that are trying to resolve your URL queries.

  18. Hi,

    thanks for the great plugin!

    I have one problem though. Some of my affiliate links have brackets in them: ) and (, but the plugin strips those away and the actual affiliate link does not work without them. Is there anything I could do about it?

    I have to use deep linking in the affiliate links and that’s why the affiliate links have brackets.

    • This link validation feature of WALM seems to be causing problems for people. I’ll release an improved version soon without link validation. I’m afraid that until then, there isn’t much that can be done. Sorry.

    • OK, thanks anyway! Looking forward to getting the improved version.

  19. i’m getting the same message as the guy before….”your original link doesn’t look like a real link”
    what could be the issue?

    • Are you trying to use hyphens in your links? As with the guy before, there is a bug in certain versions of PHP that causes this error for hyphenated links.

    • yep. so is there a way to correct this? contact the affiliate for an unhypenated link?

    • The bug is present in only a couple of older versions of PHP. You could contact the vendor for a non-hyphenated link or update to the latest version of PHP.

      I will include a solution to this problem in the next release. Thanks!

  20. I have to say this is an awesome plugin. Lightweight and does its job.

Leave a comment

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

*

Read this to make your comment cool.