The easiest way to add affiliate marketing to your MemberPress site
Step-by-step guide to integrating affiliate tracking with your MemberPress membership site
MemberPress is one of the most popular WordPress membership plugins, powering thousands of membership sites, online courses, and subscription businesses. If you're using MemberPress and want to grow your membership base through affiliate marketing, AffiliateBase provides seamless integration.
This comprehensive guide will walk you through everything you need to know about setting up an affiliate program with MemberPress, from plugin installation to tracking membership sign-ups, renewals, and upgrades.
Whether you're selling online courses, premium content, or subscription memberships, an affiliate program can help you acquire new members while rewarding your partners for successful referrals.
Follow these steps to integrate AffiliateBase with MemberPress:
Install AffiliateBase WordPress Plugin
Connect Your AffiliateBase Account
Enable MemberPress Integration
Configure Stripe Webhooks
Set Up Commission Rules
Test the Integration
Custom MemberPress Integration Example
If you prefer a custom integration, here's how to track MemberPress transactions programmatically:
<?php
// Add to your theme's functions.php or custom plugin
// Track MemberPress membership sign-ups
add_action('mepr-event-transaction-completed', 'affiliatebase_track_memberpress_signup', 10, 1);
function affiliatebase_track_memberpress_signup($event) {
$transaction = $event->get_data();
$user = $transaction->user();
$membership = $transaction->product();
// Get affiliate ID from cookie or URL parameter
$affiliate_id = isset($_COOKIE['affiliate_id']) ? $_COOKIE['affiliate_id'] : null;
if ($affiliate_id) {
$api_key = get_option('affiliatebase_api_key');
wp_remote_post('https://api.affiliatebase.com/track-conversion', [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $api_key,
],
'body' => json_encode([
'affiliateId' => $affiliate_id,
'type' => 'membership_signup',
'amount' => $transaction->total,
'currency' => $transaction->currency,
'customerId' => $user->ID,
'subscriptionId' => $transaction->subscription_id,
'metadata' => [
'membership_id' => $membership->ID,
'membership_name' => $membership->post_title,
'transaction_id' => $transaction->id,
],
]),
]);
}
}
// Track subscription renewals
add_action('mepr-event-recurring-transaction-completed', 'affiliatebase_track_memberpress_renewal', 10, 1);
function affiliatebase_track_memberpress_renewal($event) {
$transaction = $event->get_data();
$subscription = $transaction->subscription();
// Get original affiliate from subscription metadata
$affiliate_id = get_post_meta($subscription->id, 'affiliatebase_affiliate_id', true);
if ($affiliate_id) {
// Track renewal conversion
// Similar code as above but with type: 'membership_renewal'
}
}
Why Use AffiliateBase with MemberPress?
AffiliateBase is the perfect solution for MemberPress site owners who want powerful affiliate tracking without complexity.
Native MemberPress Integration
Built-in integration with MemberPress hooks and events. Automatically tracks membership sign-ups, renewals, and upgrades without custom code.
Stripe Integration
Works seamlessly with Stripe payments through MemberPress. Tracks both one-time payments and recurring subscriptions automatically.
Subscription Lifecycle Tracking
Tracks subscription renewals, upgrades, downgrades, and cancellations. Ensures affiliates receive commissions for recurring revenue.
Multiple Membership Levels
Support for different commission rates based on membership tiers or products. Perfect for sites with multiple membership levels.
WordPress Plugin
Easy-to-use WordPress plugin with MemberPress integration built-in. No coding required for basic setup.
Affiliate Dashboard
Give your affiliates a professional dashboard to track their performance, view commissions, and generate affiliate links.
Frequently Asked Questions
Does AffiliateBase work with MemberPress? ▼
Yes! AffiliateBase has native integration with MemberPress through our WordPress plugin. It automatically tracks membership sign-ups, renewals, and subscription changes.
How are subscription renewals tracked? ▼
AffiliateBase tracks MemberPress subscription renewals automatically. When a member's subscription renews, the original affiliate receives commission for the renewal, ensuring they're rewarded for recurring revenue.
Can I set different commission rates for different membership levels? ▼
Yes! You can configure different commission structures in AffiliateBase based on membership level, product, or any other criteria. This gives you full control over your affiliate program.
Does it work with Stripe? ▼
Absolutely! AffiliateBase integrates seamlessly with Stripe through MemberPress. It tracks both one-time payments and recurring subscriptions via Stripe webhooks for maximum accuracy.
Do I need to modify my MemberPress checkout? ▼
No, the integration works automatically with MemberPress's standard checkout flow. AffiliateBase captures affiliate IDs from cookies or URL parameters and tracks conversions when transactions complete.
Can affiliates see their performance? ▼
Yes! Affiliates get access to a professional dashboard where they can view their conversions, commissions, performance metrics, and generate affiliate links.
What happens when a member upgrades or downgrades? ▼
AffiliateBase tracks membership changes and adjusts commissions accordingly. The original affiliate maintains attribution, and commissions are calculated based on the new membership level.
Related Platform Guides
Create an Affiliate Program with Memberstack
Complete guide to setting up an affiliate program with Memberstack. Track membership sign-ups, subscriptions, and upgrades using AffiliateBase and webhooks.
Create an Affiliate Program with Memberful
Complete guide to setting up an affiliate program with Memberful. Track membership sign-ups, subscriptions, and upgrades using AffiliateBase and webhooks.
Create an Affiliate Program with Next.js
Complete guide to setting up an affiliate program in Next.js. Step-by-step integration with code examples and best practices for Next.js developers.
Create an Affiliate Program with Nuxt
Complete guide to setting up an affiliate program in Nuxt. Step-by-step integration with Nuxt 3, server routes, and composables for Vue developers.
Create an Affiliate Program with WordPress
Complete guide to setting up an affiliate program in WordPress. Step-by-step integration with plugins, themes, and Stripe for WordPress SaaS and membership sites.
Ready to Launch Your MemberPress Affiliate Program?
Get started with AffiliateBase today and start growing your membership site through affiliate marketing.