Wix is a leading cloud-based web development platform that allows users to create HTML5 websites and mobile sites. If you're running a Wix site and want to monetize it through an affiliate program, AffiliateBase makes it simple.
This comprehensive guide will walk you through everything you need to know about setting up an affiliate program with Wix, from custom code integration to form tracking and Stripe payment integration.
Whether you're running a business website, online store, or portfolio, an affiliate program can help you grow your audience and increase revenue.
Follow these steps to integrate AffiliateBase with your Wix site:
Add the Tracking Script
<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://cdn.jsdelivr.net/npm/@relay-capital/affiliatebase-tracking@1.0.9/dist/track.min.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:
// https://yoursite.wixsite.com/mysite?via=test123
// Open browser console and check:
console.log(window.AffiliateBase?.referral); // Should show a generated referral ID
Why Use AffiliateBase with Wix?
AffiliateBase is the perfect solution for Wix users who want to add affiliate marketing to their websites.
Simple Custom Code
Easy integration using Wix's custom code feature. Just copy and paste.
Stripe Integration
Works seamlessly with Stripe Payment Links, Buy Buttons, and embedded checkout.
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.
Ready to get started?
Get started with AffiliateBase today and start growing your Wix site with affiliate marketing.
Start for freeFrequently 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
Complete guide to setting up an affiliate program in Webflow. Step-by-step integration with Webflow CMS, custom code, and forms for no-code developers.
Create an Affiliate Program for Your Squarespace Site
Complete guide to setting up an affiliate program for your Squarespace site. Step-by-step integration with Squarespace code injection and forms for no-code users.
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 WordPress themes, plugins, and WooCommerce for any WordPress site.
Ready to Launch Your Wix Affiliate Program?
Get started with AffiliateBase today and start growing your Wix site with affiliate marketing.