Affiliate plugin?

Been reading various posts that talk about affiliate and referral systems, but nothing direct.

I see there is a function where you can become a WPMU DEV Premium affiliate.

Is that a plugin that is available?

  • drmike
    • DEV MAN’s Mascot

    We've been bugging Andrew for such a feature for the Supporter and Pay to Blog plugins.

    *bug* *bug* *bug* :slight_smile:

    We have a client who is using phpMyAds which got renamed OpenAds which then got renamed as OpenX (Ain't Open Source fun?) and a Wordpress plugin. The site for the Wordpress plugin is down but here's the link:

    Would something like that work for you?

  • georgef
    • The Incredible Code Injector

    @Hiranthi, thank you. There are a few which mention 'affiliate', but none that are accurate, except for WP-Affiliate which seems good, but unfortunately not compatible.

    @drmike thanks, OpenAds looks really good, but not quite what I am after.

    The closest I've found so far was this from Summit Media Concepts (discussed in a thread somewhere)

    That's 50bucks but it's the best I've found so far. If there is no alternative, I might just go with that.



  • georgef
    • The Incredible Code Injector

    Hi James,

    Thanks, and by the looks of it, that's what I'll have to do anyway.

    I haven't found anything close to what I want.

    Gary from Summit Media Concepts replied to me and said:

    Unfortunately, this plug-in only controls access to the admin and does not control access to specific areas or features. You're not the first to ask, and I'm considering expanding the purpose of the plug-in.

    The plugin looks great, but I was thinking more in the lines of having user restrictions like the supporter plugin provides, or various levels like the upgrades (still trying to determine which is going to work best for me)

    Thanks again James!


  • James Farmer
    • CEO (of WPMU DEV, honest)

    In fact, I've been bugging people about it today too :slight_smile:

    There are still a few cool things that need to be inserted into it - for example, having payouts based on clicks rather than conversions, linking conversions to plain signups or supporter conversions and adding in conversions based on other actions - like using a contact form (and tagging that contact with the afil key).

    All in all it's gonna be pretty massive / powerful so we want to get it just right.

    It's working well here though... there'll be some pretty nice payments coming to premium affiliates very shortly, so I recommend people get with it :slight_smile:

  • nightlyfe
    • Design Lord, Child of Thor

    +1 vote for moving the affiliate plugin up the list.

    Some ideas:

    • Allow me to pay outside affiliates with paypal OR check as per terms I set / they check. I like the ad share plugin in basic function and UI as a base for this, but I'd also like to see more credit card processor based solutions overall (as opposed to only paypal everywhere).
    • Allow me offer time-sensitive affiliate bonuses or offer performance rewards.
    • Tie in with the welcome plugin. This makes it easy to push the sale for the affiliate. There should be a place for me to set default sales language and a place for the blog admin to override.
    • Offer separate or additional terms of service, and or require additional fields in user profile (for instance, getting a blog requires only email, but becoming an affiliate requires full contact info and a 2nd "affiliate terms" checkbox. What you have here is a "low-legal" way of doing this that some might be too keen on.. the details link goes to the home page fyi :slight_smile:
    • Offer built in link cloaking (where, for instance, each blog as a like like or instead of having to build a cloak url on their own (or making the admin figure out the sticky bits
    • In a later version, it would be great to have affiliate tracking like zazzle. There, if someone, say a blog, links to your site they dont get an affiliate credit (as a plain link). However, if they link to your site with a star (*) at the end, they do get an affiliate link.

      Example use case for this: Say I run a blogging platform. I want a customer/user to.. blog. I also want them to bring more people to the site, and bring other customers/users. By making a user add the asterisk when promoting, you make them more conscious of their links, and more proactive with spreading "paying" links. However, to their readers and friends, the link just looks like a link with a star.. Zazzle is also clear that even if the new visitor ends up signing up at some other 'user/blog' within the system, the account that had the star is the one that gets the credit.. not the one where they click the join link -- although a revenue split might be good here too.

    I've used post affiliate pro, and I'm just recently moving to a wordpress platform. It would be great to work this functionality in as well.


  • James Farmer
    • CEO (of WPMU DEV, honest)

    @nightlyfe that's rocking feedback, thanks heaps!

    A few thoughts / responses (feel free to respond back to them too -although I'll be out if reach for the next week):

    - Payment processing is gonna be a 2.0 component.... it's just too stinking hard to get out first off so payments will need to be processed manually.

    - Time sensitive... nice.

    - Agree re: automessage plugin, but are you talking about giving each user their own automessage plugin style features? Kinda like running multiple membership sites rather than individual blogs?

    (I know where you;re getting at there... and yes, it's cool :slight_smile:

    - Terms of Service... yaaaawn, sorry, what was that :smiley: This is for the person you are using as an affiliate, right, so basically a ToS box next to where they enter their PayPal info or similar an a checkbox should cover that?

    - Link cloaking.... tick... in fact we can do better (although it does require some policing)

    - The zazzle thing sounds cool, but surely you'd have to have them in your system to run affiliate stuff with them so I'm not sure why having a * setup would work better? I know what you mean re: consciousness (never a bad idea) but I reckon that it might also confuse and I'm not sure how much it would raise awareness.

    Regular juicy affiliate payments should be enough to raise consciousness too don't ya think :wink:

    Post affiliate pro looks cool too, we'll take a look at that in terms of design / functionality requirements.

    Cheers, James

  • nightlyfe
    • Design Lord, Child of Thor


    Hope you're back around and this reaches you.

    Auto message (really, in the industry "autoresponders", done best by aweber). Great example (in Drupal): sign up for the seo toolbar here (not a spam site, highly respected seo company).

    Watch the emails over the next few days.


    I should be able to set up my own "welcome to my MU install, become a customer" series of messages. These should be sent automatically. Additionally, if the user (who is a new user) should reply to one of these messages, I should also have a message "ready and waiting for them" (as well as receive a notice in my inbox).

    So it would look like this:
    -- Day one, email one (response 1 waiting)
    -- Day two, email two (response 2 waiting)
    .. and so on.

    (as you can see in the seobook example, these are 'high value' emails, and not sales letters. the last email in the sequence is the sales letter. at most, the first few have a signup link in the footer)

    Again, this would all be in "my admin" area, since I'm the one who wants to make money (right?) -- that said, since this is an affiliate module, the affiliate is going to want the chance to personalize these messages since the new customer is a "guest" of theirs in my system. This is especially true for domain-mapped blogs.

    Imagine if got someone to signup for edublogs, they'd want the welcome messages to be personalized by the notedprofessor. -- so yes, to the new user, it would feel like a small member site just for that blog, even though they are becoming a customer of the MU install.

    (Version 2 feature: the notedprofessor should be able to set their own price, so that if they get the affiliate to sign up and pay more -- presumably because they offer some bonus ebook/consulting/value -- they get the commission plus the increased cost, or it could simply be that I dont list prices on the root domain, and only the affiliates set prices.)

    yes, a check box (checked by default) would work fine for the TOS (with a popup when they want to read them)

    There are MANY effective plugins for wordpress when it comes to affiliate systems, I highly suggest you dont reinvent the wheel and only focus on getting this to hook into MU and ideally BP as well.

    I highly recommend that you focus on CC in version **1** -- borrow from another OSS project if you need to. The conversions increase DRAMATICALLY when you offer a simple credit card based processor. You may even be able to find a plug-in way of doing this so you're not on the line for support.

    or hook into this:

  • Christopher Price
    • The Incredible Code Injector

    Looks really great! It seems all the basics are there. However, I've been doing a little research on these programs since you started teasing us, so I have a few specific, probably next-version-y, questions to ask:

    Is there any way to deal with the the TypePad way of doing things: If all new signups are supporters for 30 days then lose their supporter privileges if they don't upgrade?

    Are commissions based solely on $X/paid membership, or can we assign a (much smaller) credit value to clicks and signups too?

    How are payouts handled? Are they automatic at a certain level? Does the affiliate need to make a request somehow?

    Is there a provision for ongoing recurring credits for subscription signups?

    Is a cookie used to track signups/memberships? How long is the cookie active?

    Is there a commission delay (say, 60 days) to avoid fraudulent paid memberships from paying out to a bogus affiliate?

    Is there a way to use coupon codes to track affiliate referrals? Member gets a discount and affiliate gets credit, e.g. a coupon code distributed on a business card or flyer (where a link isn't necessarily used).

  • James Farmer
    • CEO (of WPMU DEV, honest)

    "Is there any way to deal with the the TypePad way of doing things: If all new signups are supporters for 30 days then lose their supporter privileges if they don't upgrade?"

    Yes, Supporter already has that feature :slight_smile:

    "Are commissions based solely on $X/paid membership, or can we assign a (much smaller) credit value to clicks and signups too?"

    Paid at the moment.

    Payouts are currently manual.

    Supporter takes recurring subscriptions just fine.

    Cookie is active for 60 days (I think)

    Commission delay is up to you - I recommend 30 days.

    No coupon codes yet - and not with this plugin I imagine, probably with another one... but you never know.

  • georgef
    • The Incredible Code Injector

    Hi James,

    Excellent! Looking good...

    I just set it up and testing it...

    Couldn't find the affiliate settings at first, but found that in the user profile.

    Testing it on several pc's and no clicks / signups are appearing yet.

    Are the stats supposed to track instantaneously?

    Also, as I'm not to sure on the technicalities, but if someone registers through buddypress, (/register), will the affiliate plugin still track this?



  • Barry
    • DEV MAN’s Mascot

    The statistics will update and display instantly.

    To cut down on database queries and overloading systems if the first visit to the site from a computer / browser ISN'T via an affiliate link then a "no affiliate" cookie is set that lasts for the lifetime of that browser session.

    So... if you enabled the plugin, did some clicking around and then created a link and tested it in the same browser session then you are not going to see any cilicks registered because the first time you clicked on your site without an affiliate link, the noaffiliate cookie was created and the system ignored you from that point onwards.

    Hope that made sense? If you want to test fully, then you need to use a different browser / machine and keep an eye on those cookies. :slight_smile:

    The registration isn't based on pages. It linkks into the new_user and new_blog wpmu hooks, so should work with buddypress ok (I'll confirm this shortly).

    Affiliate settings for user - I'm moving this off the profile page to make it easier to find / use.


  • Andrew
    • Champion of Loops


    How do you hook it into something besides Supporter?

    You'll need to code a custom plugin integrating it with something else. The provided supporter integration plugin serves as a good example.

    What kind of functionality does it have for regular WordPress?

    Works basically the same way. This site uses the same plugin.


  • Barry
    • DEV MAN’s Mascot

    Exactly. There is a plugins directory within affiliate directory. Have a look at the supporter plugin that is in there and it should give you an idea of how to code one to interface or hook into other systems.

    The plugin works the same for regular wordpress, other than the Affiliate administration pages being under the Dashboard menu instead of the Site Admin menu.

  • fiddyp
    • Site Builder, Child of Zeus

    Just to confirm some things.

    I already had the supporter plugin and now I've installed the affiliate plugin, I don't need to change anything re. the supporter plugin right?

    the link that is shown in the users profile after they enable affiliate links, can a user just use the appended part (?ref=treepoint-11821) to apply to any links they create pointing to the main site or supporter page or blog signup page and it will track those links?

  • Andrew
    • Champion of Loops

    I already had the supporter plugin and now I've installed the affiliate plugin, I don't need to change anything re. the supporter plugin right?

    You need to upgrade to the latest version.

    the link that is shown in the users profile after they enable affiliate links, can a user just use the appended part (?ref=treepoint-11821) to apply to any links they create pointing to the main site or supporter page or blog signup page and it will track those links?

    I believe they need to use the exact url.


  • Barry
    • DEV MAN’s Mascot

    The reference query string can be appended to any URL on the site that has the plugin running.

    So for an MU site with the plugin in mu-plugins, it will actually work if they point to their own blog as well as the main domain.

    Obviously, the instructions for the user on the profile page show the link pointing to the main domain (as this is were you should have your "selling text" to complete a sale anyway) :slight_smile: But the idea is that they could link to any page on your main site (FAQ, support, etc..) with the affiliate link and they would still be credited with the unique click.

  • fiddyp
    • Site Builder, Child of Zeus

    re. the supporter plugin, that's updated so thanks for clearing that up but with regards to the affiliate plugin, on my install, the link is always pointing to the blog where you're viewing the profile. so uses

    did I do something wrong?

  • fiddyp
    • Site Builder, Child of Zeus

    forgive me for bumping this again but I've been looking through the code so i can hook in the upgrades plugin so it applies a commission when credits are bought by someone referred by an affiliate.

    As far as I can see, the user who is referred by someone only has that affiliate id stored when they create a blog, this is ok for hooking the supporter plugin to pay commission because a supporter package applies to a blog but what if a user without a blog buys upgrade credits?

    This is because I will have other things that credits can be used to purchase like advertising, blog review etc that a user doesn't need a sub-blog for. I'll be rewarding the affiliate for every purchase the user they referred makes.

    it seems the only way the affiliate referral id is stored for referring a user is when that user signs up for a blog, is that right?

    if so, I could use an update_usermeta($current_user->ID,'referred_by',cookiehash) in the handle_affiliate_link function in affiliatelite.php or add a custom plugin and use the init action to do the same check that handle_affiliate_link uses and store the referrer in the users meta table.

    If a user buys upgrade credits i would be able to just check to see if they have a usermeta of "referred_by" and use that value to add a credit to the affiliates data.

    sound feasible?

  • Barry
    • DEV MAN’s Mascot

    If I've understood your post incorrectly then shout, but I would do the following:

    Make a custom plugin for the affiliate system and hook into the wpmu_new_user action instead of the new_blog one (assuming that all purchasers need to be a user). That hook will pass in the new users user_id.

    You can keep the code in the function quite similar, but change the update_blog_option line to an update_usermeta one:

    update_usermeta( $user_id, 'affiliate_referrer', AFFILIATEID );

    That way you don't need to change the affiliatelite.php file at all.

    Your next step would be to add an action hook in there that is triggered when a credit is purchased and that checks for the existance of the usermeta (were user_id is that of the person buying the credit, and $amount is the amount you want to credit the affiliate):

    $aff = get_usermeta($user_id, 'affiliate_referrer');
    do_action('affiliate_purchase', $aff, $amount);

  • fiddyp
    • Site Builder, Child of Zeus

    it's funny because I just did exactly this! I had a good look around the code first and put the action for wpmu_new_user in a file within affiliate/plugins and used a similar function to the new_blog one in the original and saved to usermeta

    I have added a notification to the affiliate who signs up a user and added a new field to affiliatedata so it records credit purchases.

    I like the fact that affiliatelite uses a filter for the column names of the dashboard report. I used that but, I had to edit the affiliateadmin.php to add actual values and totals to the output and the extra settings for the level of comission is easy with the do_action that was added in the admin settings page, thanks for that Barry!

    I'm putting in a new page under profile for showing the users an affiliate has referred along with data for what they have purchased, when they joined etc. which should be a nice thing to have.

    so far it's looking pretty sweet. Once I get it up and running, I'll be able to code some widgets that users can display on their blogs and 'sell' things like banner ads or ebooks in exchange for credits. They can then use the credits to upgrade parts of their blog like diskspace or additional plugins.

    it's a wicked good great plugin!!

  • GrayH
    • Flash Drive


    So the workflow with this is they sign up for the program, get links, share-em, then:

    1. Someone signs up and becomes a supporter through their link.
    2. The sales/commissions per affiliate are tracked with the plugin
    3. Once a month, I go in and make payments in PayPal to my affiliates?

    I guess it wouldn't make sense to make them recurring, then I'd have to keep track of too much information.


  • Andrew
    • Champion of Loops

    1. Someone signs up and becomes a supporter through their link.
    2. The sales/commissions per affiliate are tracked with the plugin
    3. Once a month, I go in and make payments in PayPal to my affiliates?

    Correct. However, a file is generated that allows you to send the payments in bulk instead of having to send each one individually.

    > So I guess I could make them recurring if I wanted to, right?
    You would need to modify the plugin for that I'm afraid. When someone signs up using an affiliate code or via an affiliate link a credit is placed on the affiliates account. Once you send out the affiliate payment for the month that commission (credit) is considered payed.


  • James Farmer
    • CEO (of WPMU DEV, honest)

    I think that this still applies:

    "You'll need to code a custom plugin integrating it with something else. The provided supporter integration plugin serves as a good example."

    We certainly may consider adding pay to blog integration if enough memebrs want it though... anyone want to put their hand up?

    Or share any custom affiliate integration plugin they might have? :slight_smile:

  • Patrick
    • Design Lord, Child of Thor

    Actually, I've converted to supporter so I don't need it w/ pay to blog.

    I do have one more clarification question... I want to pay a recurring commission. I've found an article where it says to change the line in affiliatelite.php to
    define('AFFILIATE_PAYONCE', 'no');

    Now, the payment setting in the admin 'supporter payment settings' would be the payment that goes out/gets credited every month. I assume if the payment fails or they cancel the plugin accounts for that and doesn't create a credit.

    Sorry for being Captain Obvious but I come from running joomla sites and have learned to overcomplicate things.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.