Skip to main content

WordPress

Steps to install snippet on a WordPress site

Plan Requirements

For WordPress.com sites: Adding custom code to headers requires a Business plan, Commerce plan, or legacy Pro plan. If you have a Free, Personal, or Premium plan, you'll need to upgrade to access this feature.

For self-hosted WordPress sites: All methods below are available regardless of hosting plan.

This is the safest and most user-friendly method, especially for WordPress.com Business/Commerce plan users:

  1. Install and activate the free Insert Headers and Footers plugin by WPCode
  2. Navigate to Code SnippetsHeader & Footer in your dashboard
  3. Paste the JS snippet into the Header box
  4. Click Save Changes

This method is update-safe and doesn't require editing theme files directly.

Method 2: Using WordPress Theme Editor

Note: This method requires WordPress.com Business/Commerce plan or self-hosted WordPress.

  • Log in to your WordPress admin dashboard
  • Go to AppearanceTheme Editor (or AppearanceEditor in older versions)
  • Select your active theme
  • Open the header.php file
  • Paste the JS snippet just before the closing </head> tag
  • Click Update File

Verification

After installation, you can verify the snippet is working by:

  • Visiting your WordPress site in a browser
  • Checking the browser's developer tools (Network tab) for Syft tracking requests
  • Monitoring your Syft dashboard for incoming data
  • Using "View Page Source" to confirm the snippet appears in the <head> section

Important Notes

  • Backup your site before making any changes to theme files
  • If using Method 2 (Theme Editor), you'll need to re-add the snippet after theme updates
  • Test the installation on a staging site first if possible