Add a referral program to Wix
Use Wix Custom Code to add the widget script to the page that holds your sign-up or booking form.
Before you start
Create a free Monkey Referrals account and a referral program. The dashboard shows your exact script with your real business ID and embed code ID. The examples below use placeholders.
Add the widget script
Wix Custom Code requires a Premium plan and a connected domain.
- In your Wix dashboard, open Settings, then Custom Code (under Advanced).
- Choose Add Custom Code and paste the widget script.
- Set it to load on the specific page with your form, and place it in the Body - end.
- Apply and publish your site.
<script
src="https://cdn.monkeyreferrals.com/widget/v1/mr.js"
data-business="YOUR_BUSINESS_ID"
data-embed_code="YOUR_EMBED_CODE_ID"
></script>
Wix forms render after the page loads. If the referral field does not appear, add data-form to point at your form.
Add the confirmation snippet
Paste this on the thank-you or confirmation page shown after the form is submitted. It confirms the referral and credits the promoter.
<script>
window.mr && window.mr('confirm');
</script>
If you cannot edit that page, skip this step and approve referrals manually from your dashboard.
Troubleshooting
- The referral field does not appear. Make sure the script is on the same page as the form and check the browser console for errors. Add
data-formwith a selector for your form, for exampledata-form="#signup-form". - The form loads late. Some builders load forms dynamically. The widget waits for the form, but a
data-formselector helps it find the right one. - Referrals stay pending. Add the confirmation snippet to your thank-you page, or approve them manually.
Questions? See the FAQ or contact us.
Ready to add your referral code field?
Free plan: one active program and unlimited successful referrals. Upgrade only if you need more.