Scripts: tracking, verification and page-level code
The Scripts tab adds code to every page of your site without editing your theme. Use Global Scripts for any code snippet, and Webmaster Scripts for the common tracking and verification IDs, where you paste only the ID and Xagio writes the tag. To add code to one page only, use the Scripts tab of the On-Page SEO box.
Open the Scripts tab
Section titled “Open the Scripts tab”- In WordPress, go to Xagio > SEO Settings.
- Open the Scripts tab.
Add global scripts
Section titled “Add global scripts”- Under Global Scripts, paste your code into Header, Body or Footer:
- Header goes inside
<head>. - Body goes right after the opening
<body>tag. Your theme must support the WordPresswp_body_openhook for this to work. Most current themes do. - Footer goes before the closing
</body>tag.
- Header goes inside
- Include the full tags, for example
<script>...</script>or<style>...</style>. - Select Save Changes.
Add webmaster scripts
Section titled “Add webmaster scripts”Under Webmaster Scripts, paste only the ID or code into the matching field, then select Save Changes.
| Field | What to paste | What Xagio outputs |
|---|---|---|
the content value of your Search Console HTML tag |
google-site-verification meta tag |
|
| Bing | the Bing Webmaster Tools verification code | msvalidate.01 meta tag |
| Google Analytics | a Universal Analytics ID (UA-...) |
the gtag.js snippet |
| Google Analytics 4 | your GA4 measurement ID (G-...) |
the gtag.js snippet |
| Google Tag Manager (Head) | the full GTM <script> block |
added to <head> |
| Google Tag Manager (Body) | the full GTM <noscript> block |
added after <body> |
| Pintrest | your Pinterest verification code | p:domain_verify meta tag |
| Yandex | your Yandex verification code | yandex-verification meta tag |
These fields only add verification and tracking tags. Xagio does not connect to your Search Console or Analytics account.
Page-level scripts
Section titled “Page-level scripts”On any page or post, open the Scripts tab of the On-Page SEO box:
- Header Scrips, Body Scripts and Footer Scripts: code added to this page only. Include the full
<script>or<style>tags. - Disable page-specific Header scripts (and Body, Footer): turn off this page’s own scripts.
- Disable global Header scripts (and Body, Footer): skip your global scripts on this page, for example to keep a tracking pixel off a thank-you page.
Changes save when you save or update the page. See The On-Page SEO box.
Hide scripts while you’re logged in
Section titled “Hide scripts while you’re logged in”To keep your own visits out of analytics, turn on Disable Scripts while Logged In in Xagio > Xagio Settings > Troubleshooting. It stops Xagio’s Header, Body and Footer scripts (global and page-level) from loading while you are logged in as an administrator. Visitors still get them. See Troubleshooting tools.
Troubleshooting
Section titled “Troubleshooting”- Body scripts don’t appear. Your theme does not call
wp_body_open. Put the code in Header or Footer if the vendor allows it, or ask your theme developer. - A RingRobin script here pauses automatic tracking. If you use the RingRobin integration, remove any manual RingRobin script from these fields. See RingRobin call tracking.