Back to Installation
Webflow Installation Guide
Step-by-step guide to install TwoBucks Analytics on Webflow.
Quick Start
Method 1: Site Settings (Recommended)
- Go to Project Settings → Custom Code
- Add the script to the Head Code section:
<script
src="https://twobucks.ai/script.js"
data-website-id="your-website-id"
async
></script>Method 2: Page Settings
For page-specific tracking:
- Go to Page Settings → Custom Code
- Add the script to the Head Code section
Track Webflow Interactions
Button Clicks
Use Webflow Interactions with custom code:
- Select your button element
- Add an Interaction → Click trigger
- Add Custom Code action:
if (window.twobucks) {
window.twobucks('button_click', {
button_text: 'Get Started',
page: window.location.pathname
});
}Form Submissions
Track form submissions:
- Select your form element
- Add Interaction → Form Success trigger
- Add Custom Code action:
if (window.twobucks) {
window.twobucks('form_submit', {
form_name: 'Contact Form',
page: window.location.pathname
});
}CMS Collections
Track CMS item views:
// Add to CMS Collection Page
if (window.twobucks) {
window.twobucks('cms_item_view', {
item_id: '{{item._id}}',
item_name: '{{item.name}}',
collection: 'products'
});
}Common Issues
Script Not Loading
- Ensure script is in Project Settings → Custom Code → Head Code
- Check that script is not in page-specific code (unless intended)
- Verify
data-website-idis correct
Interactions Not Firing
- Ensure custom code is added to the correct interaction trigger
- Check browser console for errors
- Verify script loads before interaction code runs
Published vs. Designer
- Custom code in Project Settings applies to published site
- Custom code in Page Settings applies to that specific page
- Test on published site, not just in designer