Flat 30% off for Singapore 🇸🇬

Integrations · Analytics

PostHog and Framer: how to connect them

Add PostHog to a Framer site by pasting PostHog's JavaScript snippet into Framer's Custom Code section, in the head on all pages, and publishing. Framer also has its own analytics, with custom events tracked through its useTracking hook in code overrides or components.

At a glance

  • How it connectsCustom code
  • Where in FramerSite Settings, Custom Code
  • Checked29 October 2026

By Shaheer Malik · Source: Framer Help: How to track custom events in Framer, read on 29 October 2026

Quick answer: Add PostHog to a Framer site by pasting PostHog's JavaScript snippet into Framer's Custom Code section, in the head on all pages, and publishing. Framer also has its own analytics, with custom events tracked through its useTracking hook in code overrides or components.

How to connect PostHog to Framer

  1. Copy the PostHog JavaScript snippet from your PostHog account
  2. In Framer, open Site Settings and the Custom Code section, then add a new script
  3. Paste the snippet, give it a clear name and choose where it goes: usually the head, on all pages
  4. Choose whether it runs once or on every page visit, as the tool's instructions say
  5. Publish the site, then check the tool's dashboard for the first visit

Good to know

How custom code works in Framer

Framer's Custom Code section, in Site Settings, is where tracking scripts and chat widgets go. Framer's help lists analytics and marketing tags, chat and support widgets, small CSS and JavaScript tweaks, and structured data as its uses. For each snippet you choose:

Before you add tracking

At a glance

ToolPostHog
CategoryAnalytics
How it connectsCustom code
Where in FramerSite Settings, Custom Code

PostHog and Framer questions

Can I use PostHog on a Framer site?

Yes. Its JavaScript snippet goes in Framer's Custom Code section like any analytics tag.

Does Framer have its own analytics?

Yes, and it can track custom events through the useTracking hook in a code override or code component.

Related integrations

Every integration is on the integrations page. If you would rather have the site built with this already connected, the Framer website sprint is $1,999 fixed for 14 days.

Want it connected for you?

I design and build Framer sites with analytics, forms and integrations set up, for a fixed $1,999 in 14 days.