AdSense とサイトの関連付けを忘れていた

エラー発生

AdSense にログインしてみたところ、
エラーが出ていた。

要注意 – 収益に重大な影響が出ないよう、ads.txt ファイルの問題を修正してください。

対策

まず、ウェブサイトに ads.txt ファイルを作成するために、
以前から使用していた Ad Inserter のプラグインの設定内容を確認。

Auto Ads の部分を参照し、
Virtual File として ads.txt の内容を書き込みました。

設定ミスが発覚

その際に併せて設定内容を確認したところ、
自分のサイトとアドセンスを紐付ける際に設定するコードが Disabled になっていました。

そのため、設定方法を今一度確認(Connect your site

設定方法

Step-by-step instructions for Auto ads on all pages:

  • Click on the last tab (gear icon  – general plugin settings)
  • Click on the tab Header (for code in the <head></head> section)
  • Paste AdSense code for Auto ads into the code window
  • Click on the Enable button above code window to enable header code (green light must be on)
  • Click on the Save Settings button to save settings

とのことだったので、Block の部分ではなく、
ギアマークの所からヘッダー部分のみに埋め込む設定に変更しました。

その後…

数時間で設定が反映されると思うので、
後ほど、広告が表示されるかどうかを確認したいと思います。

AMP には別途設定が必要らしい…汗)