Quick Start
Method 1: Custom Code (Recommended)
- Go to Settings → Custom Code
- Click + Add Custom Code
- Configure:
- Name: TwoBucks Analytics
- Code Type: Head
- Paste your code:
<script
src="https://twobucks.ai/script.js"
data-website-id="your-website-id"
async
></script>- Select Load code on: All pages
- Click Apply
Track Wix Events
Button Clicks
- Select your button
- Go to Settings → Interactions
- Add On Click → Run Custom Code:
if (window.twobucks) {
window.twobucks('button_click', {
button_text: 'Sign Up',
page: window.location.pathname
});
}Form Submissions
- Select your form
- Go to Settings → Form Settings
- Add After Submit → Run Custom Code:
if (window.twobucks) {
window.twobucks('form_submit', {
form_name: 'Contact Form',
page: window.location.pathname
});
}Common Issues
Script Not Loading
- Ensure script is in Settings → Custom Code → Head
- Check Load code on is set to All pages
- Verify
data-website-idis correct
Custom Code Not Running
- Ensure code is added to the correct element/event
- Check browser console for errors
- Verify script loads before custom code runs
Wix ADI Sites
If using Wix ADI (Artificial Design Intelligence):
- Switch to Editor mode
- Follow the Custom Code method above
- ADI sites may have limited custom code support