Many services, such as Google AdSense and Mailchimp, require you to add code to your site header to verify your website or integrate features. Adding code to your header ensures it loads on every page of your site. In this guide, you will learn how to add code to your website header.
In this guide
Have a question?
Ask our AI assistantIf you want to verify your site with Google Search Console, Bing, Pinterest, Yandex, or Facebook Business, you do not need to follow the steps in this guide. Instead, navigate to Jetpack → Traffic (or Jetpack → Settings → Traffic tab in WP Admin) and scroll to Site verification to add the verification code without editing site files.
To verify your site with Google Analytics, follow these steps to connect to Google Analytics.
Services like Google AdSense, Mailchimp pop-ups, and Meta Pixel do not have integrated tools and require the method described below.
This feature is available on sites with the WordPress.com Personal, Premium, Business, and Commerce plans. For free sites, upgrade your plan to access this feature.
Many services ask you to add code between your site’s <head> and </head> tags. This code helps the service recognize and communicate with your website.
To add code to your website header or footer, follow these steps:
- Install and activate the free Insert Headers and Footers plugin by WPCode.
- From your site’s dashboard, navigate to Code Snippets → Header & Footer.
- Paste the code into the Header or Footer box.
- Click “Save Changes“.

The steps above work with any tool that requires you to add code to your site header. Popular services include:
- Google AdSense
- Mailchimp Pop-ups
- Meta Pixel (formerly Facebook Pixel)