Sign inDocsBlogAboutSupportContact
Analytics

Add any tracking pixel to WordPress in 10 seconds

Every ad platform tracked. Three commands, thirty seconds, zero plugins installed.

4 min read May 2026 11 tracking commands

Adding a tracking pixel shouldn't require a plugin

You signed up for Google Analytics. Or Facebook Ads. Or TikTok. They gave you an ID and said "paste this snippet into your site's head tag."

On WordPress, that means: install a plugin for the specific platform, or install a generic "header scripts" plugin, or edit your theme's header.php (which gets overwritten on update), or use a child theme just to add one line of JavaScript.

For something that should take 10 seconds, it takes 10 minutes and leaves behind a plugin you'll forget about.

What most people do instead

Every approach adds more than it should.

Platform-specific plugins One plugin per pixel. Facebook has theirs, Google has theirs, TikTok has theirs. Five pixels = five plugins.
Header/footer script plugins Paste raw JavaScript into a textarea. No validation. Easy to break. Stays loaded forever even after you remove the pixel.
Edit theme files Add the snippet to header.php. Overwritten on next theme update. Requires FTP access.

A better way: one command per pixel

Open the TrueCommander navigator. Type the command for your platform. Paste your ID. Hit enter. The tracking script is injected into every frontend page via wp_head. Persisted in the database. Survives theme updates. Disable or re-enable anytime.

TrueCommander
GA4 tracking enabled
GA4 Tracking Active
Status Enabled
Measurement ID G-AB12CD34EF

Shown in advanced mode, where commands start with tp. In easy mode you type the same command without the tp prefix.

Saved in the database, not your theme. Tracking IDs persist through theme switches and updates. To turn one off, remove it from the Startup Commands module; run the command again to re-enable.

All 11 platforms, same pattern

Every tracking command works the same way: paste your ID, hit enter. To turn one off, remove it from Startup Commands. Re-enable by running the command again.

PlatformCommandID flag
Google Analytics 4enable ga4-mid=G-XXXXXXXXXX
Facebook Pixelenable fb pixel-pid=123456789012345
Microsoft Clarityenable clarity-cid=abc123xyz
Hotjarenable hotjar-hid=1234567
TikTok Pixelenable tiktok pixel-tid=1234567890
Snapchat Pixelenable snapchat tag-pid=1234567890
Pinterest Tagenable pinterest tag-pid=1234567890
LinkedIn Insightenable linkedin tag-lid=1234567
X (Twitter) Pixelenable x tag-tid=1234567890
Bing UETenable bing tag-uid=1234567890
Google Tag Managerenable gtm-cid=GTM-XXXXXXX

How it works

Same architecture for every platform.

1
Paste your tracking ID The command validates the format (alphanumeric, correct prefix) and saves it to the database.
2
Script injects on every page load The official tracking snippet is output in wp_head on every frontend page. No theme editing.
3
Turn it off anytime Remove the entry from Startup Commands to disable. Run the command again to re-enable.

Real example

You're launching a Black Friday campaign. Google Ads, Facebook Ads, and TikTok Ads are all running traffic to your WooCommerce store. Each platform needs its conversion pixel installed before the first ad dollar is spent.

You open the navigator three times in 30 seconds. GA4 measurement ID, Facebook Pixel ID, TikTok Pixel ID, each one pasted and confirmed. All three scripts are now injecting on every frontend page load. No plugins installed. No theme files touched. No developer needed.

Two weeks later, the campaign ends. TikTok underperformed. You open the Startup Commands module and remove the TikTok pixel entry. The script stops injecting. Re-run tp enable tiktok pixel with your ID to bring it back next quarter.

Meanwhile, GA4 and Facebook Pixel keep running, they weren't touched. Each pixel is independent. Turn any one off without affecting the others.

Platform-specific guides

Each pixel has its own detail page with screenshots, setup instructions for that platform, and a worked example.

Goes further with TrueCommander

Install once, manage from the navigator forever.

Frequently asked questions

Ready?

Every pixel, one command each.

This is 11 of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.