Forms & Data

Adding Custom Code and Analytics

Add tracking scripts, analytics, and custom code to your site

Adding Custom Code and Analytics

Need to add Google Analytics, Facebook Pixel, or other tracking code? Here's how to add custom code to your Framekit site.

Accessing Custom Code Settings

  • Open your site in the editor
  • Go to Settings (gear icon)
  • Click Custom Code in the sidebar
  • Header vs Footer Code

    Header Code (Before )

    Add code that needs to load early:

    • Google Analytics / GA4
    • Google Tag Manager
    • Facebook Pixel base code
    • Meta tags
    • Font imports
    • CSS stylesheets

    Footer Code (Before )

    Add code that can load later:

    • Chat widgets (Intercom, Crisp, etc.)
    • Analytics event tracking
    • JavaScript that runs after page load
    • Third-party widgets

    Common Integrations

    Google Analytics 4 (GA4)

    Paste in the Header Code section:

    ``html

    `

    Replace G-XXXXXXXXXX with your actual GA4 Measurement ID.

    Facebook Pixel

    Paste in the Header Code section:

    `html `

    Replace YOUR_PIXEL_ID with your actual Pixel ID.

    Google Tag Manager

    Paste in the Header Code section:

    `html

    ``

    Chat Widgets

    Most chat tools (Intercom, Crisp, Drift, etc.) provide a script. Paste it in the Footer Code section.

    Saving and Publishing

  • Paste your code in the appropriate section
  • Click Save
  • Publish your site to apply changes
  • Custom code only appears on your live published site, not in the editor preview.

    Important Notes

    • Test thoroughly after adding custom code
    • Invalid code can break your site - double-check syntax
    • Scripts load on all pages of your site
    • HTTPS required - ensure scripts use https:// URLs

    Troubleshooting

    Code Not Working?

  • Make sure you've published after saving
  • Check browser console for errors
  • Verify the code is in the correct section (header vs footer)
  • Ensure no typos in tracking IDs
  • Site Looks Broken?

  • Remove the custom code
  • Publish again
  • Check the code for errors before re-adding
  • Still have questions?

    Our community is here to help you succeed.

    JOIN DISCORD