Know what must work before you launch
Test Wix custom code and a supported checkout before inviting affiliates
- Best fit
- Teams evaluating AffiliateBase for a Wix 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 Wix merchants running a program for their own offers. It is separate from applying to Wix’s company affiliate program.
Wix’s official custom code guide requires a published site with a connected domain and warns that third-party code may be affected by Wix frontend security. Confirm that AffiliateBase loads on your live site before depending on it.
Wix Stores and Wix-hosted checkout do not expose an AffiliateBase handoff in this guide. Use AffiliateBase only with a Stripe Payment Link or merchant-controlled Checkout Session you can verify, then confirm the referral, sale, and commission.
Follow these steps to integrate AffiliateBase with your Wix site:
Add the Tracking Script
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>
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>
Track with Wix Velo (Advanced)
// In your Wix Velo page code
import wixWindow from 'wix-window';
$w.onReady(function () {
// Get referral ID from browser
wixWindow.getBrowserAPI().then(api => {
const referralId = api.window.AffiliateBase?.referral || '';
console.log('Referral ID:', referralId);
// Store in session or pass to forms
if (referralId) {
// Add to hidden form field
$w('#hiddenReferral').value = referralId;
}
});
});
Test Your Integration
// Visit your site with a test affiliate link:
// Open the exact setup-test link shown in AffiliateBase.
// Open browser console and check:
console.log(window.AffiliateBase?.referral); // Should show a generated referral ID
Why Use AffiliateBase with Wix?
Wix can host custom code on eligible sites, but both script execution and checkout attribution need verification.
Simple Custom Code
Easy integration using Wix's custom code feature. Just copy and paste.
Stripe Integration
Use a Stripe Payment Link or Buy Button on the tracked page and verify the completed checkout; Wix Stores is not covered by this path.
Wix Velo Support
Advanced users can leverage Wix Velo for custom tracking logic.
No Coding Required
Basic setup works with any Wix template without writing code.
Frequently Asked Questions
Do I need Wix Premium to use AffiliateBase?
Can I track conversions from Wix forms?
Does AffiliateBase work with Stripe on Wix?
What tracking parameters does AffiliateBase support?
Related Platform Guides
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.
Create an Affiliate Program for Your Squarespace Site
Review Squarespace code-injection prerequisites, compatible Stripe checkout options, native-commerce limits, and AffiliateBase verification steps.
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 WordPress
Install AffiliateBase on WordPress, choose a supported Stripe checkout, and verify referral attribution without assuming WooCommerce or plugin compatibility.
Ready to Launch Your Wix Affiliate Program?
Get started with AffiliateBase today and start growing your Wix site with affiliate marketing.