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
  • August 20, 2013 at 3:05 am

    Hello!
    I’m trying to add some links, but I keep getting a “Your original link doesn’t look like a real linka” error. It’s VERY much a valid link but the plugin won’t let me save the link. Any help is greatly appreciated! ( a link to the screenshot- http://cl.ly/image/0s2y1f2E2Y1B)
    ALSO, couldn’t make my comment cool. Got a 404 page :(

  • July 28, 2013 at 9:24 pm

    You really make it seem so easy with your presentation
    but I find this matter to be really something that
    I think I would never understand. It seems too complex and
    very broad for me. I am looking forward for your next post, I will
    try to get the hang of it!

  • Steven
    May 15, 2013 at 5:54 am

    “Your original link doesn’t look like a real link” – I’ve noticed a few other comments and it said that this would be rectified in a new version but that was over a year ago. I get this issue too :(

  • dwxxx
    April 22, 2013 at 6:48 pm

    I’m testing this plugin under nginx + wordpress. Pretty permalinks is enabled and working (the test articles I created use them correctly), however the affiliate links just gives me a 404 error. Is there anything special or different I need to do within nginx to get this working?

  • tyr0n
    February 11, 2013 at 9:13 pm

    Hello,

    How can I apply this plugin to custom coded content. I’m referring to the google link tracking part. The code is inside the index.php template file and shows a table with som links.

  • Jack
    October 20, 2012 at 5:23 pm

    Would it be possible to add a feature which would count how many clicks each link had overall?

  • yann
    September 28, 2012 at 1:29 pm

    Is there a way to import links ?
    I have a lot of link to import (250) and don’t want to do it one by one.

    Thx

  • September 22, 2012 at 12:10 am

    The plugins doesn’t work anymore on my website http://om.pubfoot.com/

    Links comes on error 404 page : http://om.pubfoot.com/billeterie/match-marseille/

    can you help me ?

  • September 3, 2012 at 7:07 am

    Thanks for this. I’ve been looking for a plugin like this for awhile!

  • August 31, 2012 at 8:45 pm

    Ohhh… Great, I thought this kind of link improvement only available on premium themes like Genesis or thesis, but now I can have the same.

    But if anyone looking for other alternative, you can use bit.ly to short your affiliate link, click statistic also provided there.

    Thanks a lot M.K :)

  • August 7, 2012 at 6:01 pm

    Hello,

    I tried to edit one of my links (because I made a failure). Now in WALM it looks okay but the link doesn’t work, the wrong first link still seems to work.

    Can you help me please?

  • Mike
    June 15, 2012 at 10:50 pm

    I would like to know if it’s possible to sort, or put the affiliate in some type of alphabetical order? I have more than 100 affiliate and trying to find one can be difficult.

  • Richard
    April 29, 2012 at 8:01 pm

    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,

    • Profile photo of M. K. Safi
      April 29, 2012 at 8:07 pm

      Hi Richard, What’s your website?

      • Richard
        April 29, 2012 at 9:05 pm

        That is www.koortslipgenezen.com

        • Profile photo of M. K. Safi
          April 29, 2012 at 9:16 pm

          Which links on this page are supposed to be tracked?

          • Richard
            April 29, 2012 at 9:39 pm

            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!

            • Profile photo of M. K. Safi
              April 29, 2012 at 9:44 pm

              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
                April 30, 2012 at 8:28 pm

                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
                May 4, 2012 at 12:50 pm

                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.

              • Profile photo of M. K. Safi
                May 5, 2012 at 4:13 pm

                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
                May 8, 2012 at 12:51 am

                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
                May 11, 2012 at 7:27 pm

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

  • Willem
    April 25, 2012 at 12:53 am

    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

    • Profile photo of M. K. Safi
      April 25, 2012 at 6:28 pm

      Willem, Link redirection and tracking combined into one.

      • Willem
        April 25, 2012 at 11:36 pm

        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

        • Profile photo of M. K. Safi
          April 26, 2012 at 12:30 am

          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.

  • April 23, 2012 at 8:07 pm

    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!

    • Profile photo of M. K. Safi
      April 23, 2012 at 8:51 pm

      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.

  • April 18, 2012 at 12:22 am

    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

    • Profile photo of M. K. Safi
      April 18, 2012 at 8:27 pm

      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.

      • April 24, 2012 at 2:24 am

        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

  • March 14, 2012 at 2:47 pm

    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

  • brian
    March 9, 2012 at 11:26 am

    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

    • Profile photo of M. K. Safi
      March 9, 2012 at 8:48 pm

      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.

  • January 31, 2012 at 6:09 am

    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

  • January 25, 2012 at 8:37 am

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

You must log in to post a comment