---
title: "Segment and Framer: How to Connect Them (2026)"
description: "Segment's JavaScript source connects to Framer through the Custom Code section: paste Segment's snippet in the head on all pages and publish, then send the."
url: https://www.shaheermalik.com/integrations/segment
language: en
format: agent view of this page (the same content as the page, as plain text)
updated: 2026-11-23
---

[Integrations](https://www.shaheermalik.com/integrations) · Analytics

# Segment and Framer: how to connect them

Segment's JavaScript source connects to Framer through the Custom Code section: paste Segment's snippet in the head on all pages and publish, then send the data on to your other tools from Segment. Framer's help lists analytics tags as a standard use of custom code.

[Framer site in 14 days](https://www.shaheermalik.com/shipitlive/framer-website-in-14-days) [All integrations](https://www.shaheermalik.com/integrations)

At a glance

- How it connects Custom code
- Where in Framer Site Settings, Custom Code
- Checked 29 October 2026

By [Shaheer Malik](https://www.shaheermalik.com/about) · Source: [Framer Help: How to add custom code](https://www.framer.com/help/articles/how-to-add-custom-code/), read on 29 October 2026

**Quick answer:** Segment's JavaScript source connects to Framer through the Custom Code section: paste Segment's snippet in the head on all pages and publish, then send the data on to your other tools from Segment. Framer's help lists analytics tags as a standard use of custom code.

## How to connect Segment to Framer

1. Copy the Segment JavaScript source snippet from your Segment 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

- Track button clicks and form submissions from code overrides if you need events beyond page views
- Framer's help has a guide to tracking links and forms with its own analytics

## 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:

- **Placement:** the start or end of the head, or the start or end of the body
- **Pages:** every page, or only the pages you select, including CMS pages
- **When it runs:** once, or on every page visit

## Before you add tracking

- Check the consent rules for where your visitors are, and add a consent banner if you need one
- Mask typed text in any tool that records sessions
- Install each tool once, so page views are not counted twice
- Test on the published site, not the editor preview, and watch page speed after adding scripts

## At a glance

| Tool | Segment |
| --------------- | -------------------------- |
| Category | Analytics |
| How it connects | Custom code |
| Where in Framer | Site Settings, Custom Code |

## Segment and Framer questions

### How do I add Segment to Framer?

Paste Segment's JavaScript source snippet into Framer's Custom Code section, in the head on all pages, and publish.

## Related integrations

- [PostHog and Framer](https://www.shaheermalik.com/integrations/posthog): custom code
- [Customer.io and Framer](https://www.shaheermalik.com/integrations/customer-io): custom code and a webhook
- [Google Tag Manager and Framer](https://www.shaheermalik.com/integrations/google-tag-manager): custom code

Every integration is on the [integrations](https://www.shaheermalik.com/integrations) page. If you would rather have the site built with this already connected, the [Framer website sprint](https://www.shaheermalik.com/shipitlive/framer-website-in-14-days) is $1,500 fixed for 14 days.

Work I designed and built

[ Silver Cat Boats Marine / Luxury · 2024](https://www.shaheermalik.com/case-studies/silver-cat-boats) [ Quadzio SaaS · 2024](https://www.shaheermalik.com/case-studies/quadzio-case-study) [ EagleRider Website Redesign Travel & Mobility · 2024](https://www.shaheermalik.com/case-studies/eaglerider-website-redesign)

Shown as the standard of work. Each project had its own scope and price. [All case studies](https://www.shaheermalik.com/case-studies)

## Want it connected for you?

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

[See the Framer sprint](https://www.shaheermalik.com/shipitlive/framer-website-in-14-days) [Get in touch](https://www.shaheermalik.com/contact)

Only need a marketing site of up to 25 pages? The [fixed-price website](https://www.shaheermalik.com/fixed-price-website) is $1,500, designed and built in Framer and live in 14 days.

## What you can do here
- Get a fixed-price proposal: https://www.shaheermalik.com/proposal/chat (describe the project in a sentence or two)
- Free website audit: https://www.shaheermalik.com/audit?site=example.com (replace example.com with the site; the score needs no email)
- Book a free scope call: https://www.shaheermalik.com/fixed-price-website#book
- Contact: https://www.shaheermalik.com/contact
- Prices and facts for the whole site: https://www.shaheermalik.com/llms.txt

## Structured data

```json
{
 "@context": "https://schema.org",
 "@type": "HowTo",
 "name": "How to connect Segment to a Framer site",
 "description": "Segment's JavaScript source connects to Framer through the Custom Code section: paste Segment's snippet in the head on all pages and publish, then send the data on to your other tools from Segment. Framer's help lists analytics tags as a standard use of custom code.",
 "url": "https://www.shaheermalik.com/integrations/segment",
 "step": [
  {
   "@type": "HowToStep",
   "position": 1,
   "name": "Copy the Segment JavaScript source snippet from your Segment account",
   "text": "Copy the Segment JavaScript source snippet from your Segment account"
  },
  {
   "@type": "HowToStep",
   "position": 2,
   "name": "In Framer, open Site Settings and the Custom Code section, then add a new script",
   "text": "In Framer, open Site Settings and the Custom Code section, then add a new script"
  },
  {
   "@type": "HowToStep",
   "position": 3,
   "name": "Paste the snippet, give it a clear name and choose where it goes: usually the head, on all pages",
   "text": "Paste the snippet, give it a clear name and choose where it goes: usually the head, on all pages"
  },
  {
   "@type": "HowToStep",
   "position": 4,
   "name": "Choose whether it runs once or on every page visit, as the tool's instructions say",
   "text": "Choose whether it runs once or on every page visit, as the tool's instructions say"
  },
  {
   "@type": "HowToStep",
   "position": 5,
   "name": "Publish the site, then check the tool's dashboard for the first visit",
   "text": "Publish the site, then check the tool's dashboard for the first visit"
  }
 ]
}
```
