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
- Enable the module in Switchboard
- Enter your tracking IDs
- Save settings
- Codes are automatically added to your site
That’s it. No code editing, no theme modifications, no additional plugins.
Supported Tracking Services
| Service | ID Format | Position |
|---|---|---|
| Google Analytics 4 | G-XXXXXXXXXX | <head> |
| Google Tag Manager | GTM-XXXXXXX | <head> + <body> |
| Meta Pixel (Facebook) | 15-16 digits | <head> |
| Google Ads | AW-XXXXXXXXXX | <head> |
Settings
Google Analytics 4 (GA4)
| Field | Format | Example |
|---|---|---|
| Measurement ID | G-XXXXXXXXXX | G-ABC123XYZ0 |
Where to find it:
- Go to Google Analytics
- Admin → Property → Data Streams
- Click your web stream
- Copy the Measurement ID
Google Tag Manager (GTM)
| Field | Format | Example |
|---|---|---|
| Container ID | GTM-XXXXXXX | GTM-ABC1234 |
Where to find it:
- Go to Google Tag Manager
- Look at the top of your container page
- 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)
| Field | Format | Example |
|---|---|---|
| Pixel ID | 15-16 digits | 1234567890123456 |
Where to find it:
- Go to Meta Events Manager
- Select your Pixel
- Copy the Pixel ID
Google Ads Conversion
| Field | Format | Example |
|---|---|---|
| Conversion ID | AW-XXXXXXXXXX | AW-123456789 |
Where to find it:
- Go to Google Ads
- Tools & Settings → Measurement → Conversions
- Click on your conversion action
- 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:
| Combination | Works? |
|---|---|
| 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
- Install Google Analytics Debugger browser extension
- Visit your site
- Check browser console for GA4 tracking calls
Or use Google Analytics → Admin → Debug View
Google Tag Manager
- Install Tag Assistant extension
- Visit your site
- Tag Assistant shows GTM status
Meta Pixel
- Install Meta Pixel Helper extension
- Visit your site
- Extension shows Pixel events
Page Source
- View your site’s page source (Ctrl+U / Cmd+U)
- Search for your tracking IDs
- 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?
- Wait 24-48 hours - data isn’t instant
- Verify code is installed (check page source)
- Check if your IP is filtered out
- Confirm you’re looking at the right property
- 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.Get access to all 147 modules with a single license