Sign inBlogSupportContact
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 pluginsOne plugin per pixel. Facebook has theirs, Google has theirs, TikTok has theirs. Five pixels = five plugins.
Header/footer script pluginsPaste raw JavaScript into a textarea. No validation. Easy to break. Stays loaded forever even after you remove the pixel.
Edit theme filesAdd 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 TrackingActive
StatusEnabled
Measurement IDG-AB12CD34EF

Saved in the database, not your theme. Tracking IDs persist through theme switches and updates. Disable with -off, re-enable anytime without re-entering the ID.

All 11 platforms, same pattern

Every tracking command works the same way: paste your ID, hit enter. Disable with -off. Re-enable by running the command again.

PlatformCommandID flag
Google Analytics 4enable ga4-mid=G-XXXXXXXXXX
Facebook Pixelenable fbpixel-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-gid=GTM-XXXXXXX

How it works

Same architecture for every platform.

1
Paste your tracking IDThe command validates the format (alphanumeric, correct prefix) and saves it to the database.
2
Script injects on every page loadThe official tracking snippet is output in wp_head on every frontend page. No theme editing.
3
Toggle on/off anytimeAdd -off to disable. Run the command without flags to re-enable. Your ID stays saved.

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 navigator: enable tiktok pixel -off. The script stops injecting. Your TikTok Pixel ID stays saved in case you want to re-enable it next quarter.

Meanwhile, GA4 and Facebook Pixel keep running — they weren't touched. Each pixel is independent. Toggle any one 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.

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.