How-to · Funnels, Websites & Forms

How to Add Custom CSS and Code to GoHighLevel Pages

GoHighLevel gives you three places for code: page or funnel CSS, head and body tracking code, and a custom HTML/JS element. Learn which to use and how to keep it from breaking pages.

What you'll do

  • Custom CSS goes in the page or funnel settings and styles elements beyond the builder's options.
  • Tracking scripts such as pixels go in the head or body tracking code fields.
  • The custom HTML/JS element places code at a specific spot on the page.
  • Target elements by their ID or a class you add, and test in preview before publishing.

GoHighLevel has three places for custom code: a custom CSS field in the page or funnel/website settings for styling, head and body tracking-code fields for scripts like ad pixels and analytics, and a custom HTML/JS element you drag onto the page for code that needs a specific position. Pick the right one, target elements by ID or class, and test in preview before publishing.

Before you start

  • A funnel or website page open in the builder.
  • Basic CSS or HTML knowledge, or code from a source you trust.
  • Your browser's developer tools (right-click → Inspect) for finding element IDs and classes.
  • A backup plan: copy the page or funnel before big changes so you can roll back.

Which place for which code?

Code typeWhereApplies to
Styling (CSS)Custom CSS in page settings, or funnel/website settingsOne page, or every page
Ad pixels, analytics, verification tagsHead tracking codeEvery page (site/funnel level) or one page
Chat or widget scripts that load at the endBody/footer tracking codeEvery page or one page
Embeds, iframes, custom HTML blocksCustom HTML/JS elementA specific spot on one page

Add custom CSS

  1. Find the element's ID. Select the element in the builder; many show an element ID in their advanced settings. Or inspect it in the preview with developer tools.
  2. Optionally add your own class to the element if the builder offers a custom class field. Why: a class you named is easier to target and reuse than a generated ID.
  3. Open the custom CSS setting for the page (or the funnel/website for site-wide rules).
  4. Write the rule, for example making a specific button's text uppercase: #button-abc123 { text-transform: uppercase; }
  5. Save and preview. If nothing changes, your selector may not be specific enough; try including the class and ID, or check the element structure in developer tools.
  6. Publish once it looks right on desktop and mobile.

Add tracking code

  1. Open the funnel or website settings (for site-wide) or a page's settings (for one page).
  2. Paste the script into the head tracking code field, unless the provider says to place it in the body.
  3. Save and publish.
  4. Check with the provider's testing tool that the script fires.

Event tracking on a thank-you page (for example, a "Lead" event) goes in that page's own tracking code. See the Integrations tutorials for specific ad platforms.

Use the custom HTML/JS element

  1. Drag the custom code element onto the page where the output should appear.
  2. Paste the HTML (and script, if any).
  3. Save and preview. Some scripts only run on the published page, not in the builder.

Code can break pages. An unclosed tag or a script error can hide content or stop forms from submitting. Add code one piece at a time, check the browser console for errors, and keep a copy of the page before changes.

Test it

  1. Preview the page, then publish and check the live version.
  2. Check desktop and mobile; CSS that looks fine on desktop can break mobile layouts.
  3. Open the browser console and look for red errors.
  4. Submit the page's form to confirm the code didn't interfere.
  5. Run a speed test; heavy scripts slow pages. See page speed.

Common mistakes

  • Styling by generated IDs that change when you duplicate a page or section.
  • Pasting full HTML documents (with their own head and body tags) into a custom element.
  • Duplicate pixels at both site and page level, double-counting events.
  • Forgetting to republish after editing code.
  • Untrusted scripts from random sources.

What to build next

Frequently asked questions

Where do I add custom CSS in GoHighLevel?

In the builder, open the page or funnel settings and look for the custom CSS field. CSS there applies to that page or across the funnel or website, depending on where you add it.

Where do I put a tracking pixel?

Paste it into the head tracking code in the funnel or website settings so it loads on every page, or into a single page's tracking code for page-specific events.

Why isn't my custom CSS working?

Usually the selector doesn't match the element, the builder's own styles are more specific, or the page wasn't republished. Inspect the element in your browser to find its ID or class.

Is it safe to paste code from the internet into my pages?

Only paste code from sources you trust and understand. Scripts run in visitors' browsers and can collect data or break your page.