WinkPress
Now Reading
Affiliate Links Manager for WordPress
Bright Idea
117

Affiliate Links Manager for WordPress

updated by MizagornFebruary 27, 2015
by M. K. SafiFebruary 3, 2011

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 4.1.1 and PHP 5.5. It has also been tested with versions down to 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.

Note on Updated Version 1.2

I took over management of this site and discovered that WinkPress has a plugin! Updates have been made to make the plugin easier to understand and URL validation strictness has been lessened quite a bit to allow for non-www URLs.

However, I have not yet gotten access to the WordPress repository to allow for the usual update method within the admin area. To use the updated version, you will first need to uninstall your current version, and then delete it. Otherwise you will get a “folder already exists” error when you install the new version. No worries, because the links you have already set up will still be stored in the database.

Download WALM 1.2 here. (You can right-click and select “Save link as…” to bypass your download manager if you want.)

Then in your admin area, go to Plugins>>Add New, and click the “Upload Plugin” button at the top of the page. Click the “Choose File” button and navigate to where you downloaded v1.2.

Select the affiliate-links-manager.zip file and click “Open”. You will then click “Install Now”. The new version will be installed, and you can activate it. You will find all your links are still there, and hopefully the plugin will be more friendly to your URLs.

Thanks to M.K. for creating such a great plugin. It’s much more complicated on the inside than it is on the outside!
~Mizagorn

How to Use

The plugin menu is found under “Links” in your WordPress admin sidebar. Simply go to “Add an affiliate link” page by clicking on Links>Affiliate Links from your admin menu.

where-to-find-walm-menu

 

  • Enter a human-friendly name for your link.
  • Enter the original affiliate link that you get from the vendor.
  • Enter a short link.
  • Click the “Add link” button.

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

One:

For performance and functionality reasons, your short link must be at least two levels. The first level is for your trigger (see below) and the second level is used to identify the specific affiliate info of the Original Link you put in.

Bad: http://example.com/level-one (Does not allow WALM to work.)

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.

That is, a short link like http://example.com/articles/some-product would be bad. This would cause conflicts with already existing category slugs, tag slugs and any other type of slug.

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: (Mizagorn note: these are a bit dated and I will get them changed when I can, but they are good for an idea of the data you will see.)

google-analytics-report

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

walm-aff-links-list


Download

Download from WordPress.org »Please temporarily use the instructions at the top of this post. 😉


Support

If you have questions, bug reports, or feature requests — post in the comments or visit the plugin support page.

If you wanna say thanks, I’d really love it if you linked to WinkPress from your site.

Or give a friendly like and share via social media at the top of this article.
If you have successfully used this plugin, vote that it is compatible with your WP version.
Thoughfully consider an honest review.

What's your reaction?
Wink It
100%
Interested
0%
Meh...
0%
What?
0%
Sad
0%
Kill It
0%
About The Author
Profile photo of M. K. Safi
M. K. Safi
117 Comments
1 2 3
  • January 7, 2012 at 9:38 am

    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.

  • November 9, 2011 at 11:34 pm

    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

    • Profile photo of M. K. Safi
      November 11, 2011 at 2:22 pm

      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.

  • October 29, 2011 at 2:43 am

    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.

  • October 25, 2011 at 10:05 pm

    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

  • Antti
    September 29, 2011 at 10:13 pm

    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?

    • Profile photo of M. K. Safi
      September 30, 2011 at 8:27 pm

      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!

  • September 17, 2011 at 6:45 am

    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

    • Profile photo of M. K. Safi
      September 17, 2011 at 1:03 pm

      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!

      • September 17, 2011 at 1:41 pm

        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!

        • Profile photo of M. K. Safi
          September 17, 2011 at 2:09 pm

          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! 😀

  • August 29, 2011 at 2:08 am

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

    Thanks for sharing it.

    • Profile photo of M. K. Safi
      August 29, 2011 at 1:47 pm

      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.

  • Alok
    August 22, 2011 at 12:53 pm

    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

    • Profile photo of M. K. Safi
      August 22, 2011 at 1:16 pm

      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
        August 22, 2011 at 2:39 pm

        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

  • August 21, 2011 at 11:13 pm

    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

    • Profile photo of M. K. Safi
      August 22, 2011 at 12:30 am

      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…

      • August 22, 2011 at 1:16 am

        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

        • Profile photo of M. K. Safi
          August 22, 2011 at 12:11 pm

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

  • August 16, 2011 at 4:53 pm

    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.

  • August 12, 2011 at 7:33 pm

    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?

  • July 4, 2011 at 6:49 pm

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

  • June 28, 2011 at 12:13 am

    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.

    • Profile photo of M. K. Safi
      July 3, 2011 at 3:28 pm

      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.

      • JimK
        July 5, 2011 at 9:42 am

        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

  • Raza
    June 24, 2011 at 8:01 pm

    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 ?

    • Profile photo of M. K. Safi
      July 3, 2011 at 3:26 pm

      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.

  • Jase
    June 18, 2011 at 11:13 pm

    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?

  • VBK
    June 5, 2011 at 6:26 am

    Looks Nice ! Will Check it :)

  • May 28, 2011 at 3:27 pm

    I don’t want to use Google Analytics. Do I still have to use a minimum of 2 levels?

    • Profile photo of M. K. Safi
      June 1, 2011 at 4:24 pm

      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.

  • Joe
    May 27, 2011 at 12:07 am

    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

    • Profile photo of M. K. Safi
      June 1, 2011 at 4:04 pm

      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.

  • March 27, 2011 at 8:26 am

    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.

    • Profile photo of M. K. Safi
      March 27, 2011 at 10:33 am

      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.

  • Malika
    March 25, 2011 at 11:23 pm

    Does this plugin give you the ability to turn particular keywords into the affiliate link like the ninja affiliate plug in?

You must log in to post a comment