Product
Solutions
Compare
Resources
Get early access Talk to us
Custom code snippets

Add code to any WordPress site without installing another plugin

HTML, CSS or JavaScript placed in the header, body or footer of any connected site, applied everywhere or only to the pages you choose, delivered through the connector that is already there.

Available now in early access. Included on every plan.

The problem

Every tag has to go somewhere, and it always ends up somewhere different

A client wants a conversion pixel. Someone adds it through a snippet plugin. On the next site it goes into the theme’s footer file, where it disappears at the next theme update. On a third it is pasted into a page builder’s custom code box that only one person knows exists.

A year later nobody can say what is running on which site. The specific failure this causes is duplicate tracking: a second analytics tag added on top of one nobody knew about, quietly doubling a client’s numbers until someone notices the reporting has been wrong for months.

Where code usually hides

  • A snippet plugin, installed on some sites and not others
  • The theme’s functions.php or footer template
  • A page builder’s custom code panel
  • A tag manager container nobody has the login for
  • Hardcoded into a child theme by a developer who has moved on
How it works

Written once here, printed by the site itself

Code is stored in WPCentrify and pulled by the site. It is never pushed into a file on the server, so nothing you add here can be lost to a theme or plugin update.

01

Write it in the dashboard

Give the snippet a name, paste the code, choose where it goes and decide whether it applies to the whole site or specific pages. Nothing reaches the site at this point.

02

The site fetches its own code

The connector requests its snippets over a signed channel and caches the response. A site can only ever fetch its own snippets, and the request is authenticated per site.

03

Printed on a WordPress hook

The connector prints the code itself on the standard hook for the placement you chose: the document head, immediately after the opening body tag, or the footer.

04

Live on the next page load

Saving sends a signed nudge that clears the site’s cache, so a change is live on the next request rather than when the cache expires. If the nudge cannot get through, the change still lands shortly afterwards on its own.

Capabilities

What you can do

Header, body or footer

Three placements covering effectively every tag you are asked to add, from a verification meta tag to a chat widget that has to load last.

Global or page-specific

Apply a snippet across the whole site, or pick the exact pages and posts it should run on from that site’s own content list rather than typing URLs.

See what is already there

A read-only scan reports code already installed by something else before you add more. It reads known snippet managers directly, attributes anything hooked into the page to the plugin or theme responsible, and checks the rendered front page for well-known tracking tags.

Survives theme changes

Because the code lives in WPCentrify rather than in a theme file, switching or updating a theme does not remove it and does not require anyone to remember to put it back.

Turn off without deleting

Disable a snippet to take it out of circulation while keeping the code and its history, which is usually what you want when you are working out whether it caused something.

Recorded like any other change

Adding, editing, enabling and removing snippets are recorded in the activity log with the person who did it and the site it applied to.

Honest limits

What to know before you rely on it

This is a delivery mechanism, not a safety net. Code you add runs on the front end of a live site, so a JavaScript error is still a JavaScript error and a heavy third-party tag is still heavy. Placing it through WPCentrify makes it visible and removable, not harmless.

Body placement depends on the theme calling the standard WordPress hook introduced in version 5.2. Most modern themes do. A theme that does not simply never receives body-placed snippets, while header and footer placement continue to work normally.

The discovery scan is deliberately read-only and best-effort. It will not remove anything it finds, and it cannot guarantee it has found everything, because code can arrive on a page in more ways than any scan can enumerate. It is there to stop the common duplicate-tag mistake, not to prove a site is clean.

Worth knowing

  • Code runs on the live front end; test it as you would any change
  • Body placement needs a theme that calls wp_body_open (WordPress 5.2+)
  • Discovery is read-only and never modifies or removes what it finds
  • Deactivating the connector stops snippets being served
  • Page targeting uses the site’s own post and page list
Answers

Questions about custom code snippets

Not for adding code through WPCentrify. Snippets are delivered by the connector that is already installed, so there is no second plugin to install or keep updated. If a site already uses a snippet manager you can keep it; the discovery scan will show you what it is running.

They stop being served. The code lives in WPCentrify rather than in the site’s files, so deactivating the connector removes the snippets from the page. Nothing is left behind in the theme or the database for someone to find later.

Yes. Choose the specific pages and posts from the site’s own content list and the snippet runs only there. The rest of the site is untouched.

No. That is one of the main reasons to do it this way. The code is not stored in the theme, so updating or switching themes has no effect on it.

No. It is entirely read-only. It reports what it finds so you can decide, and it never edits, disables or removes code that something else installed.

Available now

One place where you can see what code is running

Header, body and footer snippets across every connected site, scoped to the pages you choose, with a scan that shows what is already there before you add more.

Free during early access. No credit card required.