Attribution script helps you to capture referral code on your landing pages and make it available at signup to attribute referral conversions to the right referrers. In addition, it helps you to personalize messages for referees on the landing page, get discount information and detect potential fraud and abuse of your referral program. Script Loading Context: The attribution script loads asynchronously and methods become available shortly after page load. All attribution methods use the unifiedDocumentation Index
Fetch the complete documentation index at: https://docs.cello.so/llms.txt
Use this file to discover all available pages before exploring further.
window.CelloAttribution("methodName") syntax.
Adding the script
You can add attribution script to your website like any other third party JavaScript code by inserting the following code snippet into the<head> tag of each page on your website.
Make sure to use
type="module" and async html params in the script tag- Sandbox URL
- Production URL
Verifying the installation
Now that you have added the attribution script to your website, make sure that theucc is available on the signup page. To verify, follow these steps:
Step 1: Test with URL parameters
Add?productId=test and ?ucc=test to your website URL:
Step 2: Check cookie storage
Open browser developer tools (F12) and verify these values are saved in cookies:cello-product-idshould containtestcello-referralshould containtest
Step 3: Test method access
Navigate to your signup page and test the attribution methods from the browser console:Troubleshooting Installation Issues
Script not loading
Methods return undefined
- Wait longer for script initialization (try 3-5 seconds)
- Check browser console for JavaScript errors
- Verify script tag has
type="module"andasyncattributes - Ensure no ad blockers are interfering
Cookie issues
- Check if cookies are enabled in browser
- Verify no GDPR/cookie consent is blocking storage
- Test in incognito mode to rule out extensions