Skip to content

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.

  1. In WordPress, go to Xagio > SEO Settings.
  2. Open the Scripts tab.
  1. 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 WordPress wp_body_open hook for this to work. Most current themes do.
    • Footer goes before the closing </body> tag.
  2. Include the full tags, for example <script>...</script> or <style>...</style>.
  3. Select Save Changes.

Under Webmaster Scripts, paste only the ID or code into the matching field, then select Save Changes.

Field What to paste What Xagio outputs
Google 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.

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.

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.

  • 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.