Skip to content

Latest commit

 

History

History
307 lines (164 loc) · 22 KB

README.md

File metadata and controls

307 lines (164 loc) · 22 KB

Affiliates

INACTIVE NOTICE: This plugin is unsupported by WPMUDEV, we've published it here for those technical types who might want to fork and maintain it for their needs.

Translations

Translation files can be found at https://github.com/wpmudev/translations

Affiliates boosts business by making all your users a part of your marketing team.

Integrated or Stand-Alone

WordPress Affiliate integrates perfectly with our Marketpress, Pro SitesDirectory and Membership plugins, and allows you to offer your visitors a share in the profits by promoting your site.

Affiliates-Paypal-link735x470

Incredibly simple to connect through PayPal.

Any User Can Do It

Use Affiliate with any regular WordPress, BuddyPress or Multisite installation - or adapt it to other payment gateways with ease. This plugin allows any user registered at your site to simply become and affiliate by filling in their PayPal email.

They are then given a link they can then use to promote the site. All of the unique clicks they attract, standard sign-ups and paid sign-ups are then tracked by the plugin and displayed - nicely - to the user and yourself.

Paid Sign Ups

As mentioned, it integrates 100% with Membership & Pro-Sites so that when a free user decides to become a paid member your affiliate gets a piece of the action. Track sales with powerful graphs and stats to see who your top performers are.

Affiliate-banners-735x470

Activate banners for easy referral sharing.

Not to mention the ability to simply (again, no code required) give your affiliates their own banners. Allow users to use regular old links which you can track via referral marking so no one ever knows they are an affiliate.

affiliate-referal-735x470

Track stats with big beautiful graphs.

Bonus Ad Management System

This plugin also functions as an ad management system to help you track the effectiveness of your advertising with all of the same reports as you receive for affiliates. You can use it for one or the other or both ads and affiliates in combination, without having to make any hacks.

In the case of an affiliate, you're looking to see X number of referrals and Y number of paid signups. When using it as an ad management system, you can easily track the same information for the ads you're placing. Simply enter a fake PayPal email address that identifies the type and location of you're placing, and you're set to go.

Usage

To Get Started:

Start by reading Installing plugins section in our comprehensive WordPress and WordPress Multisite Manual if you are new to WordPress.

Login to your admin panel for WordPress or Multisite and activate the plugin:

  • On regular WordPress installs – visit Plugins and Activate the plugin.
  • For WordPress Multisite installs – Activate it blog-by-blog (say if you wanted to make it a Pro Sites premium plugin), or visit Network Admin -> Plugins andNetwork Activate the plugin.

Once installed and activated, you will see a new menu item in your admin: Affiliates.

Affiliate Settings Menu

Let's configure some settings, click on Affiliates > Settings.

Affiliate Settings

Here you will see a full page of options, let's go through them section by section.

Affiliate Link URL

Affiliate settings - Affiliate Link URL

Enter the Link URL that will be provided to affiliates for referral links. The plugin will automatically take care of appending their referral ID to the url.

Currency used for PayPal Masspay

Affiliate settings - Currency

Enter the Currency you'll be using for payments, this will be reflected in the exported Masspay file. The PayPal masspay file link takes you to PayPal's site to find out more about Masspay.

Column Settings

Here you can enter the terms used for the columns in the reporting tables that affiliates will see.

Affiliate settings - Column Settings

The terms you can customize are as follows:

  • Unique Clicks
  • Sign ups
  • Paid members

You can, for example, change 'Paid members' to 'Paid affiliates' if you prefer.

Profile page text

You can further enhance the experience for your users by providing content specific to them or your site. The same visual editor used for Posts is available here for customizing those messages.

Affiliate settings - Profile page text

The Affiliate settings profile text editor lets you customize the initial content they see in their affiliate section. And the Affiliate advanced settings profile text editor lets you customize the advanced content users see regarding their referral links and URL tracking.

Banner Settings

Affiliates lets you provide banner ads as well, you simply provide links to the images and it will make the banners available to affiliates along with respective referral links.

Affiliate settings - Banner Settings

The Enable Banners drop-down lets you enable or disable the banner image section. In the Banner image URLs text area, you can enter all the banner image links you want, one per line. The plugin will take care of displaying them neatly, with the relevant referral links, for your affiliates.

Approval Settings

Affiliate settings - Approval Settings

You can allow payouts pending approved status using the Pay only approved affiliates drop-down. The plugin will still track the affiliate stats but no payouts will occur for them until you manually approve them. This manual process can be very helpful for avoiding affiliate fraud.

Save your settings

Affiliates settings - Update Settings button

Be sure to press the Update Settings button to save your settings when finished.

Add-ons

Affiliates provides a number of add-ons to extend its basic tracking functionality and allow you to track sales referrals. Click on Affiliates > Add-ons in the admin menu.

Affiliates - Add-ons menu

You'll see a table of add-ons along with options to activate and deactivate them.

Affiliates - Add ons

The list includes add-ons for integration with the following plugins:

  • Directory
  • Membership
  • Pro Sites
  • MarketPress

If any of those plugins are installed and activated, the respective add-on will be available for activation here. If a plugin isn't both installed and activated, the add-on will indicate this with a '-- plugin not installed' note after the add-on's name:

Affiliates - Add-ons - plugin not installed

There's also an Affiliates debugging add-on that can help to track down any existing cookie issues. The Addon Status column indicates whether an add-on is Active or Inactive. The Bulk Actions drop-down lets you toggle the activation status of multiple add-ons at a time. Simply tick all the add-ons you'd like to activate/deactivate, then select Toggle Activation from the drop-down and click the Apply button. Hovering your mouse over a particular add-on will also display a link to Activate or Deactivate it.

Add-on Activate link

Directory Add-on

With the Directory add-on activated, you'll see a new Affiliates tab in the Directory settings at Listings > Settings.

Affiliates - Directory add-on

1. Click the Affiliates tab at Directory > Settings
2. Enter credits for recurring payments
3. Enter credits for one-time payments
4. Press the Save Changes button

The payment options allow for a whole dollar value along with a cent-based value.

MarketPress Add-on

When the MarketPress add-on is activated, you'll see a new Affiliate Settings section in the MarketPress settings at Products > Store Settings > Payments.

Affiliates - MarketPress add-on

Enter a value for the Set percentage to be paid to affiliates option to credit affiliates a percentage of the referrals they make resulting in MarketPress product sales.

Membership Add-on

When the Membership add-on is activated, you'll see a new Affiliate settings section when editing yourMembership subscriptions at Membership > Subscription Plans.

Affiliates - Membership add-on

Enter the value you want for the Affiliate payment credit for signup on this subscription option and specify a currency. You can specify a different credit amount per each subscription plan.

Pro SitesAdd-on

The Pro Sites add-on is only available in the Network Admin section since Pro Sites is a network activated plugin. Affiliates would need to be network activated as well, in order to use this add-on. With the Pro Sites add-on activated, you'll see a new Affiliate Settings section when editing yourMembership subscriptions at Pro Sites > Settings.

Affiliates - Pro-sites add-on

Simply enter the credit amounts for 1 Month payment, 3 Month payment, and 12 Month payment,  payment along with currency for each.

Add-ons in Multisite

When Network Activated in Multisite, Affiliates works slightly differently. The add-ons will only be available for activation if the respective plugins are Network Activated as well. You'll then see a Network Activate option under the add-ons.

Shortcodes

Besides full access to the Affiliates Plugin features in the Admin Panel, you can use any of the following shortcodes within your posts or pages to provide front-end access as well.

  • [affiliatelogincheck] - place this at the top of the page that you are planning on using the rest of the shortcodes on and it will display a login message if the user isn't logged in.
  • [affiliateuserdetails] - mirrors the affiliate details form from the admin area (yellow box)
  • [affiliatestatstable] - mirrors the large click statistics table
  • [affiliatevisitstable] - mirrors the referrers this month table
  • [affiliatetopvisitstable] - mirrors the top referrers table
  • [affiliatestatschart] - mirrors the main statistics charts
  • [affiliatevisitschart] - mirrors the referrers charts
  • [affiliatebanners] - displays the banners you add to your affiliate settings

If the user isn't logged in then none of the shortcodes will output anything (except for the top one). As an example, you could create a page at Pages > Add New and call it 'Affiliates'. And you could then include the following shortcodes in that new page: [affiliatelogincheck] [affiliateuserdetails] [affiliatestatstable] When logged-in users visit that page, they'll see the Affiliate Referral section, where they can then become affiliates and see details about their referrals. Logged-out users visiting that page would be prompted with a login message.

Affiliates - Logged-out users

How users become affiliates

An affiliate system wouldn't be much use without affiliates, so let's see how we can get those affiliates started! Once a user is registered and signed in on your site, they'll see a menu item at Profile > Affiliate Referrals.

Affiliate referrals menu

If you've setup a page using the Affiliates shortcodes, users could access the affiliate details from the site's front-end, simply by visiting the Page you included the shortcodes in. They will see something like this:

Affiliate referrals - frontend

By clicking the edit link, they'll be able to show or hide the affiliate options. They can specify whether they want to be an affiliate using the Enable Affiliate Links drop-down, selecting Yes please. They can then enter their PayPal Email Address. This will be used in the MassPay export process to automatically pay them for any referrals they generate. By opting to become an affiliate, they'll then see the following additional section.

Affiliate referrals - referral code

1. Referral URL including affiliate code
2. URL to automatically track referrals from

The plugin automatically generates a referral ID for the user based on their username along with a unique number. It provides a Referral URL including that code for referral purposes. Users can also enter a URL in the Your URL field. Any referrals made from that URL will automatically be tracked to their referral ID. Users can utilize either or both of those URLs to refer traffic to the site and the plugin will track signups generated from them.

How referrals are handled

Affiliates uses a browser cookie to track referral clicks. When a user clicks through a referral link, a cookie is created in the browser that the plugin will later use to link further activity (such as a purchase) with that referral. To avoid issues with users clicking multiple referral codes and thus negating the original link they clicked through, the plugin tracks the first click-through they used within a particular session. For that matter, it's always a good idea to clear browser cookies when testing the tracking features. Let's take a look at the affiliate reports section, click on Affiliates > Affiliate Reports.

Affiliate Reports

Here you have a brief overview of affiliate stats as well as options for exporting payments and marking transactions as paid.

Affiliates - Affiliate Reports

  1. Select the reporting month from the Show report for drop-down.
  2. To export a Masspay file, simply tick the box for each affiliate you would like to payout, then click the Export Payments button.
  3. Mark the transactions as paid by ticking the box of each affiliate, then clicking the Pay Balances button.

Hovering your mouse over an affiliate's username will display a few links.

Affiliates - Affiliate Reports - user links

Quickly pay the balance for this affiliate using the Pay Balance link. Click the Manage Affiliate link to go to the affiliate management section for this affiliate. Let's go through the affiliate management section, click on Affiliates > Manage Affiliates.

Manage Affiliates

Here you will see a list of your users along with basic affiliate details. You can easily search through the users to pull up reports on each affiliate and their performance.

Affiliates - Manage Affiliates

Hovering your mouse over the affiliate's username will display a link that you can use to pull up reports for the affiliate.

Affiliates - Manage Affiliates - manage link

Click the manage link to go to the Affiliate System Administration section for this affiliate.

Affiliate System Administration

Here you'll see detailed stats per month for the affiliate.

Affiliates - Manage Affiliates - Report

When referral activity is available for a given month, the month will be presented as a link. You can click on the month to show details specific for that month. The following is an example of what you'll see.  

Affiliates - Manage Affiliates - stats by month

You'll see that within the Note column, there are links provided depending on what the recorded affiliate activity was for. In the above case, there's a link to a MarketPress Order. You will also find a handy chart and some options to debit, credit and set payment on the account.

Affiliates - Manage Affiliates - Credits

To add a credit to the affiliate's account, select a month from the Period drop-down, enter a monetary Value, add a note in the Credit for field and press the Add Credit button. This will credit the affiliate's account, awaiting payout. To subtract money from an affiliate, select a month, enter the amount to subtract and some notes, then press the Add Debit button. The affiliate's account will be debited by the amount specified and will affect the payout. To add a payment, set the options and press the Add Payment button. This will payout the affiliate immediately.

Advanced Usage

Affiliate provides a lot in the way of advanced options to help you customize it more to your specific needs as well as being extendable by way of custom code. Let's take a look at some advanced customization features.

Affiliate Cookie Days

When a user clicks through a referral link and signs up, the signup will be credited to the affiliate whose link they clicked. Affiliates defaults to 30 day tracking of those referrals. To set the amount of days that you want affiliate tracking to take place, you can do so by adding the following code to your wp-config.php file within the root folder of your WordPress install. define('AFFILIATE_COOKIE_DAYS',45); You can substitute the 45 with any number of days you want.

AFFILIATE_COOKIE_DAYS

AFFILIATE_COOKIE_DAYS code added to wp-config.php file

Recurring affiliate payouts

When used to track referral sales, Affiliates defaults to paying an affiliate for the first sale only. That can be changed by adding the following to your wp-config.php file: define('AFFILIATE_PAYONCE', 'no'); With that added, affiliates will be paid for every single payment made by the referred user.

Customizing the affiliate reference code

By default, Affiliates uses a simple formula to generate referral codes for users. For a prefix, it utilizes the username and for a suffix, it uses the user ID + a keyed value (35 by default). This normally entails that affiliates get referral URLs like so:

You can alter the prefix so that instead of using the username, it uses whatever prefix you want, by adding the following to your wp-config.php file: define('AFFILIATE_REFERENCE_PREFIX','myprefix'); You can also change the key, by adding this: define('AFFILIATE_REFERENCE_KEY',1); Given the above changes as an example, affiliates would have referral URLs like so:

Replace referral cookies

As noted previously, when users click a referral link, a cookie is created in the user's browser that will attribute their signup to the account of the referral code they clicked through. By default, this won't be overwritten if the user then clicks through a different referral link. But this can be changed by adding the following to your wp-config.php file: define('AFFILIATE_REPLACE_COOKIE', 'yes'); Using that, any referral link clicked by the user will replace any existing cookie with the new referral code. This can be especially useful for testing purposes but can also help if you simply want the referral process to work differently than usual.

Advanced coding

For developers, there is an 'affiliate_click_amount_filter' filter hook available that is called when affiliate unique click processing starts. The filter allows the admin to set an amount to be used for the referral click transaction (default is zero). Here's how the filter looks in the plugin code: $amount = apply_filters('affiliate_click_amount_filter', '0.00', $affiliate ); And here's an example of that filter being used to set a value of $1.25 for signup referrals: add_filter('affiliate_click_amount_filter', 'my_affiliate_click_amount_filter', 10, 2); function my_affiliate_click_amount_filter($amount, $affiliate) { $amount = "1.25"; return $amount; } You can easily set a different value in place of the '1.25'.