Weebly's HTML/CSS editor provides custom code injection capabilities that make it simple to add tracking scripts across your entire website, perfect for small businesses using Weebly's drag-and-drop builder.
Add tracking script to your Weebly site
Weebly's recommended approach is to use the Header Code feature in the site settings, which applies the script to all pages automatically.
-
Log into your Weebly account and open your site editor
-
Click Settings in the top menu
-
Go to SEO tab
-
In the Header Code section, add your tracking script:
<script async defer src="https://affonso.io/js/pixel.min.js" data-affonso="YOUR_PUBLIC_PROGRAM_ID" data-cookie_duration="YOUR_COOKIE_DURATION" ></script>
-
Click Save
-
Publish your site for the changes to take effect
Alternative: Use the Embed Code element on individual pages if you only need tracking on specific pages.
For more details, see Weebly's code editor guide.
Testing
- Publish your Weebly site after adding the header code
- Visit your published site with
?atp=test
- Check browser DevTools → Console → type
window.affonso_referral
- Verify tracking in your Affonso dashboard
Note: Header code injection is available on Weebly paid plans.
Multi-Domain Setup
If you're using Weebly only for your marketing site (e.g., yourcompany.com
) and your application runs on a subdomain (e.g., app.yourcompany.com
), make sure to install the Affonso tracking script on both domains.
Affonso works seamlessly across subdomains - the same affiliate cookie will be shared between yourcompany.com
and app.yourcompany.com
. See our multi-domain setup guide for more details on cross-domain tracking.
Next Steps
Once installed, you can access affiliate referral data and pass it to your payment provider. Connect your payment provider →