How to integrate third-party tools on Framer
Integrate third-party tools in Framer by using the Code Override feature, Custom Components, or embedding scripts through the Site Settings. Most integrations require adding JavaScript code or HTML embeds to connect external services like analytics, chat widgets, or payment processors.
Prerequisites
- Active Framer account with a published site
- Basic understanding of HTML/JavaScript
- Third-party tool account and API credentials
- Framer Pro subscription for custom code features
Step-by-Step Instructions
Access Site Settings for Script Integration
Create Custom Components for Widget Integration
Use Code Overrides for Advanced Functionality
Example structure:
export function MyIntegration(): Override {
return {
onMount() {
// Initialize third-party tool
}
}
}Configure Environment Variables
FRAMER_ prefix (e.g., FRAMER_API_KEY). Access them in your code using process.env.FRAMER_API_KEY. This keeps credentials secure and separate from your published code.Embed Third-Party Widgets Using Embed Component
Set Up Form Integrations
Test and Publish Integration
Common Issues & Troubleshooting
Third-party script not loading or executing
Check if the script is placed in the correct section (head vs body). Verify the script URL is accessible and not blocked by ad blockers. Use browser console to check for JavaScript errors and ensure dependencies are loaded first.
API calls failing or returning errors
Verify your API credentials and endpoint URLs are correct. Check CORS settings on the third-party service. Ensure environment variables are properly configured with the FRAMER_ prefix and accessible in your code.
Embed components not displaying correctly
Increase the embed component height and width. Check if the third-party service supports iframe embedding. Verify the embed code is complete and properly formatted without missing closing tags.
Code overrides not applying to components
Ensure the override function is exported correctly and matches the expected TypeScript interface. Check that the component supports the override type you're applying. Refresh the preview after making code changes.