Tracking Codes Manager

Quickly add Google Analytics 4, Google Tag Manager, Meta Pixel (Facebook), and Google Ads tracking codes to your WordPress site. Just paste your IDs - we handle the rest.

Use Cases

  • Set up Google Analytics 4 tracking in seconds
  • Add Meta Pixel for Facebook/Instagram advertising
  • Deploy Google Tag Manager for advanced tracking
  • Enable Google Ads conversion tracking

How It Works

  1. Enable the module in Switchboard
  2. Enter your tracking IDs
  3. Save settings
  4. Codes are automatically added to your site

That’s it. No code editing, no theme modifications, no additional plugins.

Supported Tracking Services

ServiceID FormatPosition
Google Analytics 4G-XXXXXXXXXX<head>
Google Tag ManagerGTM-XXXXXXX<head> + <body>
Meta Pixel (Facebook)15-16 digits<head>
Google AdsAW-XXXXXXXXXX<head>

Settings

Google Analytics 4 (GA4)

FieldFormatExample
Measurement IDG-XXXXXXXXXXG-ABC123XYZ0

Where to find it:

  1. Go to Google Analytics
  2. Admin → Property → Data Streams
  3. Click your web stream
  4. Copy the Measurement ID

Google Tag Manager (GTM)

FieldFormatExample
Container IDGTM-XXXXXXXGTM-ABC1234

Where to find it:

  1. Go to Google Tag Manager
  2. Look at the top of your container page
  3. Copy the ID shown after your container name

When using GTM, the module adds both the <head> script and the <body> noscript fallback automatically.

Meta Pixel (Facebook Pixel)

FieldFormatExample
Pixel ID15-16 digits1234567890123456

Where to find it:

  1. Go to Meta Events Manager
  2. Select your Pixel
  3. Copy the Pixel ID
FieldFormatExample
Conversion IDAW-XXXXXXXXXXAW-123456789

Where to find it:

  1. Go to Google Ads
  2. Tools & Settings → Measurement → Conversions
  3. Click on your conversion action
  4. Copy the Conversion ID

What Gets Added

Google Analytics 4

<!-- Google Analytics 4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>

Google Tag Manager

In <head>:

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];...})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>

After <body>:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"...></iframe></noscript>

Meta Pixel

<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){...}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1234567890123456');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1234567890123456&ev=PageView&noscript=1"/></noscript>

Using Multiple Services

You can use any combination:

CombinationWorks?
GA4 only
GTM only
GA4 + Meta Pixel
GTM + GA4⚠️ See note
All services

GA4 + GTM: If you use Google Tag Manager, you can configure GA4 inside GTM instead of using both. Using both may result in duplicate pageviews. Choose one method.

Verifying Installation

Google Analytics

  1. Install Google Analytics Debugger browser extension
  2. Visit your site
  3. Check browser console for GA4 tracking calls

Or use Google Analytics → Admin → Debug View

Google Tag Manager

  1. Install Tag Assistant extension
  2. Visit your site
  3. Tag Assistant shows GTM status

Meta Pixel

  1. Install Meta Pixel Helper extension
  2. Visit your site
  3. Extension shows Pixel events

Page Source

  1. View your site’s page source (Ctrl+U / Cmd+U)
  2. Search for your tracking IDs
  3. Verify codes appear in correct locations

Need Custom Tracking Code?

For tracking codes not listed here, use the Header & Footer Code module to add custom scripts anywhere on your site.

Privacy Considerations

These tracking codes collect visitor data. Consider:

  • Adding a cookie consent banner (required in EU)
  • Updating your privacy policy
  • Enabling IP anonymization in GA4
  • Understanding GDPR/CCPA requirements

FAQ

Do I need all of these tracking codes?

No. Only add what you actually use:

  • GA4: For general website analytics
  • GTM: For advanced tag management (often replaces direct GA4 installation)
  • Meta Pixel: Only if running Facebook/Instagram ads
  • Google Ads: Only if running Google Ads campaigns
Should I use GTM or direct GA4 code?

Use GTM if: You need advanced tracking, multiple marketing tags, or your marketing team manages tags.

Use direct GA4 if: You only need basic analytics and want simplicity.

Don’t use both unless you know exactly why you need to.

Why don’t I see data in Google Analytics?
  1. Wait 24-48 hours - data isn’t instant
  2. Verify code is installed (check page source)
  3. Check if your IP is filtered out
  4. Confirm you’re looking at the right property
  5. Use GA4’s Realtime report for immediate verification
Will this slow down my site?Tracking codes do add some overhead, but these scripts are designed to load asynchronously and have minimal impact on page load. Google’s scripts are served from fast CDNs.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro