Agency owners usually go looking for the Custom JS field when they want a small UI tweak, a chat widget or a tracking script. The field exists, but it applies to the whole agency, and a bad script affects every user. This guide covers where it lives, how to add code, how to limit it to certain sub-accounts, and how to test it.
Where Custom JS lives in GoHighLevel
The main place is the agency's company settings. HighLevel's help article describes a Custom Code section with a Custom JavaScript field for things like live chat widgets, Google Analytics and tracking pixels. There is also a Custom CSS field for styling and hiding elements.
As of October 2026, the path most guides give is:
- Switch to Agency View (not inside a sub-account).
- Open Settings, then Company.
- Go to the Whitelabel tab.
- Find the Custom JS box and paste your code.
- Save, then hard-refresh your browser tab.
One community guide lists the same sequence: Agency, Settings, Company, Whitelabel, the Custom JS box, then save. HighLevel changes its settings layout from time to time. If a label doesn't match, look for the custom code section under the agency's company or white-label settings.
The field is part of the white-label settings, so what you see can depend on your plan. If it's missing, ask HighLevel support rather than hunting for a workaround.
Agency method: step by step
Do this the same way every time so you can undo it.
- Copy the existing contents first. Paste whatever is already in the Custom JS box into a text file. That's your rollback.
- Add your snippet at the bottom, not the top, unless the snippet's instructions say otherwise. Keep a comment above each snippet saying what it does, who added it and when.
- Save and hard-refresh. Custom JS loads with the page, so a normal tab that's already open won't pick up changes.
- Check the browser console. Open your browser's developer tools and look for red errors on the dashboard, Conversations, Contacts and Calendars pages.
- Test with a second login. Use a user with limited permissions, because that's what your clients see.
Agency-level code applies to every sub-account under the agency. That's the point for something like branding, and a risk for anything else.
Sub-account method: scope by location
There's no obvious "Custom JS" box in each sub-account's Business Profile. A feature request on HighLevel's ideas board asks for a dedicated location-level custom code field, which suggests it isn't there as a native option. That request could be answered at some point, so check your own sub-account settings.
In the meantime, agencies scope the script themselves. While you're working inside a sub-account, its location ID typically appears in the page URL. Your agency-level script can read that and only run for the accounts you list. A HighLevel ideas thread shows people doing this for per-client logos, pasting code into the agency's custom JS section with a map of location IDs.
A bare-bones pattern looks like this:
(function () {
try {
var allowed = ["LOCATION_ID_ONE", "LOCATION_ID_TWO"];
var match = window.location.href.match(/location\/([^\/?#]+)/);
var id = match ? match[1] : null;
if (!id || allowed.indexOf(id) === -1) return;
// your change for those sub-accounts goes here
} catch (e) {
console.warn("Custom JS skipped:", e);
}
})();
The URL structure is the part most likely to change, so treat the matching line as something to re-test after HighLevel updates. See the location ID glossary entry if you need to find an ID, and the sub-account entry for how accounts relate to the agency.
Other places code can go
Custom JS in company settings only affects the dashboard. Two other spots get confused with it:
- Funnel and website pages. These have their own custom code settings in the builder, separate from the dashboard. Dashboard code doesn't touch your public pages, and the reverse is also true.
- Workflow Custom Code action. This action runs JavaScript and Python inside a workflow. It handles data between steps. It can't tweak the interface.
If you want to read or move data, you may be better off with the API. Our private integration token guide explains how to set that up for a single sub-account.
How to add Custom JS safely
HighLevel's own help article calls custom JS and CSS powerful but unsupported, warns that changes to the core UI can break your code, and says to test thoroughly. Treat that as the rule.
- Know the source. Only paste code you've read or got from someone you'd trust with admin access. A script in this box runs for every user, including you.
- Never put secrets in it. Anything in the box is delivered to the browser. Don't paste API keys or tokens into it.
- Keep it small. Short, single-purpose snippets are easier to remove than one large script.
- Wrap it. Use a try/catch block, as in the example above, so one failure doesn't stop the rest of your code.
- Use a test sub-account. Check changes on a spare account before saving widely, since the agency box has no staging mode.
- Keep a changelog. Note each addition and the date. When something looks off after a HighLevel update, you'll know what to disable first.
- Don't stack overlapping tools. Two scripts that both modify the same menu or page can conflict.
Where the native method gets slow
The Custom JS box works, but it's a single text field for the entire agency. That has costs:
- One snippet that fails can interfere with others in the same box.
- There's no built-in version history, so you maintain your own.
- Per-client behavior needs location checks you write and maintain.
- A UI update from HighLevel can break selectors and force you to debug in the browser.
This is manageable for a few small tweaks. It gets tiring if you're also trying to maintain dark mode styles, contact lookups and file previews yourself.
Where Power-Ups fits
Power-Ups is one of the six RGS Tools, made by Revenue Generating Solutions. It runs inside GoHighLevel through one Custom JS line, so you paste a single line into the field described above instead of maintaining your own scripts. It's $19/month per agency with unlimited sub-accounts, a 7-day free trial and cancel any time.
It includes four features: Contact Peek, File Preview, Dark Mode and Duplicate Contact. For walkthroughs, see our posts on dark mode in a sub-account and finding and handling duplicate contacts. RGS Tools isn't affiliated with HighLevel Inc.
You don't need it to follow the steps above. If you only need one small tweak, the native field and a careful snippet are enough.
Questions
Where is the Custom JS field in GoHighLevel?
Switch to Agency View, open Settings, then Company, and look for the Custom JS box on the Whitelabel tab. Menu labels can change, so check the current layout if you don't see it.
Can I add Custom JS to just one sub-account?
As far as we can verify, there is no dedicated Custom JS field inside each sub-account's settings. The common workaround is to add the script at the agency level and have it check the location ID before it does anything.
Can custom JavaScript break my GoHighLevel account?
It can break the interface you see, because the script runs in every user's browser on every page load. It doesn't change your data on its own, but a bad script can still make pages misbehave, so test it with a spare sub-account first.
Is the Custom Code workflow action the same thing?
No. The workflow Custom Code action runs JavaScript or Python as a step inside an automation and returns output for later steps. It doesn't change what users see in the dashboard.