Documentation
Header Ad Code
Your ad network will provide a header code to place within the tag to run your ads. This code can be inserted in the Header Ad section, which will apply the ad placement across your entire site in the header element.
However, this feature is not fully optimized for Accelerated Mobile Pages (AMP) and it applies a single setup to all of your pages, which may cause errors.
To address this, we recommend using the Layout & Design Tool, which is fully optimized for AMP. This allows you to insert header code that is compatible with AMP when it's available.
The Layout & Design Tool also enables you to run A/B tests on your header codes, which can be easily managed using URL query parameters. This functionality lets you create multiple ad templates, share specific ad configurations on social media, and set a different default ad setup. The tool is highly versatile, offering you full control over your monetization strategy.
Typically, the best location for an Ad Header Code element is the Top Bar, as this ensures the code will run across all pages of your site.