Know what must work before you launch
Install sitewide tracking and verify the exact checkout plugin or Stripe flow
- Best fit
- Teams evaluating AffiliateBase for a WordPress affiliate workflow.
- Checkout handoff
- The checkout path must receive the generated AffiliateBase referral ID.
- Proof required
- Complete one referred checkout and confirm the attributed sale and commission.
Follow the attribution evidence
Illustrative scenario · fictional values
-
Referred visit
?via=partner
AffiliateBase captures the visit and generates a referral record.
-
Checkout handoff
referral ID
The checkout must carry the generated identifier into Stripe.
-
Paid event
$99 paid
A supported Stripe event confirms the attributed payment.
-
Commission
$19.80 due
An eligible attributed sale creates the commission record.
-
Payout prep
Payout ready
Review the commission and prepare the next step with your payout provider.
This guide is for a WordPress merchant running an affiliate program for its own products or memberships. WordPress can load the tracking script, but the CMS does not determine whether a sale is attributable.
You need administrator access for a sitewide script and a checkout that passes AffiliateBase’s generated referral ID to Stripe. WordPress may strip scripts from content for users without the required capability, as described in the official Custom HTML documentation.
WooCommerce, MemberPress, and other plugins own their checkout requests. Treat each as unverified until its Stripe request contains the generated referral ID. For a directly embedded Payment Link or custom Checkout Session, follow the Stripe guide and verification checklist.
Follow these steps to integrate AffiliateBase with your WordPress site:
Add the Tracking Script
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>
Add via functions.php (Alternative)
// Add to your theme's functions.php
add_action('wp_head', function() {
?>
<script>(function(w,r){w._abq=w._abq||[];w[r]=w[r]||function(){(w[r].q=w[r].q||[]).push(arguments)}})(window,'affiliatebase');</script>
<script async src="https://app.affiliatebase.io/track.js" data-account-id='YOUR_ACCOUNT_ID'></script>
<?php
});
Integrate with Stripe
Use Stripe Payment Links or Buttons (Optional)
<!-- Keep Stripe checkout elements on the same page as the AffiliateBase script. -->
<a href="https://buy.stripe.com/xxxxx">Buy now</a>
<stripe-pricing-table
pricing-table-id="prctbl_xxx"
publishable-key="pk_live_xxx"
></stripe-pricing-table>
<!-- For custom or redirected Stripe-hosted links, opt in explicitly. -->
<a data-affiliatebase href="https://link.payment/xxxxx">Buy now</a>
Test Your Integration
Why Use AffiliateBase with WordPress?
WordPress can host the script; each commerce or membership checkout still needs its own attribution test.
Easy Installation
Add a single script tag to your WordPress site. No plugin required.
WooCommerce Requires Verification
The gateway must pass the generated referral ID into the Stripe payment path. Generic order metadata does not establish AffiliateBase attribution.
Membership Plugins Own Checkout
Use the matching platform guide and verify the exact membership plugin and gateway before launch.
Stripe Integration
Track conversions from Stripe payments on your WordPress site.
Frequently Asked Questions
Do I need a WordPress plugin for AffiliateBase?
Does AffiliateBase work with WooCommerce?
Can I use AffiliateBase with membership plugins?
What tracking parameters does AffiliateBase support?
Related Platform Guides
Add an Affiliate Program to Next.js
Install affiliate tracking in Next.js, hand the generated referral ID to a server-created Stripe Checkout Session, and verify attribution.
Add an Affiliate Program to Nuxt
Load affiliate tracking in Nuxt, pass the generated referral ID to a server route, and verify a Stripe sale and commission.
Create an Affiliate Program with Webflow
Add affiliate tracking to a published Webflow site, pair it with a supported Stripe checkout, and verify referral attribution before launch.
Add Affiliate Tracking to a React Checkout
Capture affiliate referrals in a React app, send the generated referral ID to your checkout backend, and verify Stripe attribution.
Add Affiliate Tracking to a Vue Checkout
Capture affiliate referrals in Vue, send the generated referral ID to your checkout backend, and verify the Stripe sale and commission.
Ready to Launch Your WordPress Affiliate Program?
Get started with AffiliateBase today and start growing your WordPress site with affiliate marketing.