Carrd's embed feature allows you to add custom HTML and JavaScript to your landing pages, making it perfect for adding affiliate tracking to your simple, effective marketing pages.
Add tracking script to your Carrd site
Carrd's recommended approach is to use an Embed element to add custom code, which ensures proper loading and compatibility with Carrd's responsive design system.
-
Open your Carrd site in the editor
-
Click the + (Add Element) button
-
Select Embed from the element types
-
Choose Code as the embed type
-
Paste 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>
-
Set the embed to Head if available, otherwise use Body
-
Click Done
-
Publish your site
Alternative: Use the site-wide HTML Head injection feature (Pro plan required) by going to Site Settings → HTML Head.
For more details, see Carrd's official embed documentation.
Testing
- Publish your Carrd site after adding the embed
- Visit your published site with
?atp=test
- Check browser DevTools → Console → type
window.affonso_referral
- Verify tracking in your Affonso dashboard
Note: The embed feature requires a Carrd Pro subscription.
Multi-Domain Setup
If you're using Carrd for landing pages (e.g., landing.yourcompany.com
) while your main application runs elsewhere (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 domains. 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 →