Skip to main content

Framer Pixel Installation

Learn how to install the Cometly Pixel into your Framer website.

Updated this week

Start Here πŸ‘‹

This guide walks you through adding the base pixel and optionally setting up session tracking with a custom event.

Why This Matters

Installing the Cometly pixel on Framer allows you to:

  • Track website sessions and visitor activity

  • Capture first-party attribution data

  • Fire custom events used in reports and attribution models

  • Ensure reliable tracking despite privacy restrictions and ad blockers


Step 1: Open Site Settings in Framer

  1. Open your site in the Framer editor

  2. Click Site Settings in the top toolbar
    ​

This is where Framer lets you manage global custom code for your site.


Step 2: Add the Cometly Pixel (Start of body)

  1. In Site Settings, click Custom Code

  2. Create a new custom code block

  3. Set Placement to Start of <body>

  4. Paste your Cometly pixel code

  5. Set Run to Once

  6. Click Save
    ​

Important:
The Cometly pixel must be placed at Start of <body> for Framer websites. This ensures it loads early enough to capture sessions and attribution correctly.


You can find your Cometly pixel in your Cometly account under Setup β†’ Install & Verify Cometly Pixel.


Step 3: (Optional) Track Website Sessions With a Custom Event (End of body) For Framer Websites

If you want to track website sessions or page-level activity, you can fire a custom event after the page loads.
​

Before you start

  • Create a Custom Event in your Cometly account

  • Take note of the event number (for example: custom_event_2)

Reference the guide on creating custom events in Cometly for step-by-step instructions.
​

Add the custom event in Framer

  1. Go back to Site Settings β†’ Custom Code

  2. Create a new custom code block

  3. Set Placement to End of <body>

  4. Paste the event script using your custom event number

Example:

<script>
setTimeout(function () {
comet('custom_event_2');
}, 500);
</script>
  1. Click Save

This triggers the custom event shortly after the page loads and is commonly used for:

  • Website session tracking

  • Page view-style events

  • Funnel entry tracking



Framer Pixel Installation Setup Tips

  • Install the Cometly pixel only once. You do not need multiple pixel installs across pages.

  • If your Framer site uses multiple domains or subdomains, make sure they are added to your Cometly workspace domain settings.

  • Remember to Publish your Framer site after saving custom code. Changes will not go live until the site is published.

Did this answer your question?