How to use direct links to your custom code pages
In short. Every Custom Codes page — the list, the Add New form, each snippet's edit page, and the Trash tab — lives at a predictable URL. Bookmark the pages you edit often, share links with teammates, or use address-bar autocomplete to skip sidebar navigation entirely. The four patterns all sit under /sg-admin/custom_codes/; the only variable is whether you're looking at the list, adding a new snippet, or editing one with its numeric ID at the end.On this page: URL patterns · When to use each · Good use cases · What not to do · Steps — bookmark setup · Troubleshooting
How to use direct links to your custom code pages
Every page inside the Custom Codes feature has its own URL. Once you understand the four patterns, you can bookmark snippets, share them with teammates, jump straight from your address bar, or reference them in a team runbook. The sections below cover each pattern and when it's useful.
What is this for?
Three situations bring people to direct Custom Codes URLs:
Bookmarking a snippet you edit on a regular cadence. A monthly Pixel rotation or a quarterly font swap is a one-click trip once the edit URL is bookmarked — instead of clicking through the sidebar, filtering, and scrolling each time.
Sharing a snippet with a teammate. Copy the URL from your address bar and paste it into chat or email. They click and land directly on the right snippet's edit page — no navigation required, as long as they have an active admin session on the same site.
Address-bar autocomplete. Once you've visited a URL, your browser remembers it. Typing cu starts auto-completing /sg-admin/custom_codes/... and arrowing to the right suggestion is faster than the sidebar for people who type quickly.
Scope
What this covers:
- The four Custom Codes URL patterns and when to use each.
- Bookmarking the list or Add New URL for faster access.
- Finding a snippet's numeric ID in the URL bar when editing it.
- Linking directly to a specific snippet's edit page (for a runbook or team doc).
What this does not cover:
- The public-side URL where snippets output their HTML — custom codes inject into every page's source and have no public URL of their own.
- API access to custom codes — this doc is admin-side navigation only.
- Searching or filtering from a URL — filters are applied via the listing UI tabs, not URL query strings.
Examples
Example 1: Bookmarking Add New for batch work. Your Store is setting up six new tracking snippets. Ada bookmarks /sg-admin/custom_codes/add_new so each new snippet opens the form directly without returning to the dashboard.
Example 2: Finding a snippet's ID for a runbook. Your Store documents their Custom Codes setup internally. Grace opens the GA4 snippet in Edit, reads the URL /sg-admin/custom_codes/edit/3, and records ID 3 so teammates can link directly to it.
Example 3: Navigating the Trash tab directly. Your Store wants to check whether a trashed snippet from last year is still in the system before recreating it. Alan opens /sg-admin/custom_codes/ and clicks the Trash tab to confirm.
Reference
| URL | Destination | When to use |
|---|---|---|
/sg-admin/custom_codes/ | Custom Codes list — All tab | Default landing; see all statuses |
/sg-admin/custom_codes/add_new | Add New form | Create a new snippet |
/sg-admin/custom_codes/edit/{id} | Edit form for snippet {id} | Update code, placement, status |
/sg-admin/custom_codes/ + Trash tab | Trash view | Restore or permanently delete retired snippets |
Good use cases
- Bookmarking snippets you edit every campaign cycle. A quarterly Pixel rotation or seasonal banner is a one-click trip from a bookmark folder rather than a three-click sidebar walk.
- Bookmarking the list itself. The list URL is the most stable bookmark — always the safe landing spot when you're not sure where you want to go next.
- Sharing a link with a developer. Paste the Add New URL into chat with brief instructions. The developer clicks, lands on the form, and doesn't need a sidebar walkthrough.
- Sharing a snippet for review. Copy the edit URL and send it. The reviewer clicks and sees the snippet immediately — no navigation needed on their end.
- Building a team runbook with direct links. Embed edit URLs in an internal doc. New team members can bookmark the snippets they expect to use on their first day.
- Browser history search. If you forgot what you edited last week, search browser history (
Ctrl+H/Cmd+Y) for "custom_codes" to see every URL you visited with timestamps.
What NOT to use this for
- Don't memorize numeric snippet IDs. IDs are an internal detail. If a snippet is trashed and recreated, the new one gets a different ID — bookmarks based on the title in your bookmark bar are more stable than bookmarks that rely on a remembered number.
- Don't share edit URLs with people who aren't logged in. Direct URLs only work for users with active admin sessions. A non-admin recipient sees the login page.
- Don't use URLs across different SGEN sites. Each site has its own subdomain and its own database.
/edit/4onyourstore.sgen.comedits a different snippet than/edit/4onanother-store.sgen.com. - Don't construct URLs for IDs you haven't seen. Navigate from the list first if you're unsure which ID maps to which snippet — guessing risks opening and accidentally editing the wrong one.
- Don't expect URLs to perform actions. There's no URL for "delete snippet 4" or "flip snippet 4 Active." Those are clicks within the page, not URL destinations.
How this connects to other features
- Custom Codes list page — the home base and safest bookmark. Land here when you're not sure which pattern you need.
- Add New — has its own URL (
/add_new). Useful for batch sessions or sharing with a developer. - Edit a custom code — every snippet has its own edit URL with the snippet's ID at the end. The most-bookmarked pattern.
- Trash a custom code — no separate Trash URL exists; reach it by clicking the Trash tab on the list page.
- Browser bookmarks bar — the URL patterns live comfortably in bookmark folders. A folder named "SGEN — daily" with five to ten direct links is a common setup.
Before you start
- Be logged in. URL patterns only work for users with an active admin session. If your session has expired, the URL redirects to the login page. Log in first, then navigate to the URL.
- Know which site you're working on. URLs are tied to a specific subdomain. The same path on two different SGEN sites edits two different snippets.
- Decide on a folder structure before you bookmark. A folder named "SGEN — daily" or "SGEN — campaigns" saves time once you have more than five bookmarks.
Where to go
All Custom Codes URL patterns live under /sg-admin/custom_codes/ on your SGEN site's domain. Replace <your-site> with your actual subdomain or custom domain.
| Page | URL pattern |
|---|---|
| Custom Codes list (all snippets) | https://<your-site>.sgen.com/sg-admin/custom_codes/ |
| Add a new custom code | https://<your-site>.sgen.com/sg-admin/custom_codes/add_new |
| Edit an existing custom code | https://<your-site>.sgen.com/sg-admin/custom_codes/edit/<snippet-id> |
| Manage form (alias for Add/Edit) | https://<your-site>.sgen.com/sg-admin/custom_codes/manage_code/<snippet-id> |
The <snippet-id> placeholder is the numeric ID of the snippet, shown in the address bar when you visit any snippet's edit page — for example, /sg-admin/custom_codes/edit/4 for the snippet with ID 4.
The manage_code route is an alias — equivalent to Add New with no ID, or Edit with an ID. You'll mostly use Add New and Edit in practice; manage_code is a behind-the-scenes name worth knowing if you see it in your address bar.
Steps — Bookmark and use Custom Codes URLs
1. Visit the page you want to bookmark
Open the SGEN admin dashboard and navigate to the page you want to bookmark.
- Custom Codes list: click Custom Codes in the sidebar. The address bar shows
/sg-admin/custom_codes/. - Add New: click Custom Codes in the sidebar, then click + Add New. The address bar shows
/sg-admin/custom_codes/add_new. - A specific snippet's edit page: click Custom Codes, then click the snippet's title. The address bar shows
/sg-admin/custom_codes/edit/<id>.
Look at the URL in your address bar — that's what you'll bookmark.
2. Bookmark the page in your browser
Press Ctrl+D on Windows or Cmd+D on Mac. Edit the title to something descriptive (for example, "Custom Codes — GA4 snippet" rather than the default generic title). Choose a folder — a folder named "SGEN — daily" or "SGEN — campaigns" works well when you have multiple bookmarks. Click Done.
3. Test the bookmark works
Click the bookmark. You should land on the exact page you bookmarked. If the bookmark goes to a "Page not found" page, check that:
- You're using the right SGEN subdomain.
- The snippet ID in the URL still matches an existing snippet (permanently deleted snippets lose their ID permanently).
- You typed the URL correctly —
custom_codeswith a trailings, and underscores not hyphens.
If your session has expired, the bookmark redirects to the login page. Log in, then visit the URL again.
4. Use the bookmark and share with teammates
Click the bookmark whenever you want to edit that snippet — one click replaces the three-click sidebar walk. To share with a teammate, right-click the bookmark and choose Copy URL, then paste it into chat with a short message. The teammate clicks the link; if they're logged into the same admin dashboard, they land on the snippet's edit page immediately.
For a team runbook or docs page, embed the URL as a labeled link: "Edit the GA4 snippet" with the URL behind it rather than "click here."
What success looks like
- Your bookmarks bar shows direct links to the Custom Codes pages you use most. Five to ten direct links is typical for an admin who edits custom codes regularly.
- Clicking a bookmark loads the right page without extra navigation. No "page not found," no sidebar required.
- Sharing URLs with teammates works. They click and land on the right snippet (assuming they're logged in).
- Browser address-bar autocomplete suggests the right URLs. Typing "custom" quickly suggests the URLs you've recently visited.
What to do if it does not work
"Page not found." Check three things: (1) Is the snippet ID still valid? Permanently deleted snippets lose their ID and the URL stops working — visit the list page to confirm the snippet still exists. (2) Is the URL typed correctly? Common typo: missing the s in custom_codes, or using a hyphen instead of an underscore in manage_code. (3) Are you on the right SGEN site? The same path on a different subdomain goes to a different place.
The URL goes to the login page. Your session has expired. Log in, then navigate back to the URL — your browser may or may not redirect automatically.
The snippet on the page isn't what you expected. This can happen if the snippet was deleted and you're working from an old bookmark. SGEN never reuses IDs — a deleted ID just returns "page not found" rather than accidentally loading a different snippet. Check that the snippet name matches what you expect before editing.
A teammate gets redirected to login. The URL is fine; the teammate's session has expired. Have them log in to the admin dashboard, then click the bookmark again.
Autocomplete suggests a URL that no longer works. The browser cached a URL for a snippet that was later deleted. Delete the autocomplete entry (most browsers let you remove individual entries with Shift+Delete) or ignore it and navigate from the list.
The URL shows /manage_code instead of /edit. Both reach the same form. Update your bookmark to /edit/<id> for consistency if you prefer, but either works.
If none of these resolve the issue, contact your support team with the exact URL you tried and a description of what you expected.
Next steps
- For details on what you can do once you're on a snippet's edit page, see the Edit a custom code guide.
- For details on adding a new snippet, see the Add a custom code guide.
- For the save action that runs when you click Update or Create, see the Save changes to a custom code guide.
