今回は自分がスマホで記事上部にGoogleアドセンスをどうやって表示させているのか紹介したいと思います。 実際に記事上部に設置しようとすると はてなブログで表示させることができるということと、それは毎回手で打たなければいけないということは調べるとありました。 がどうやるかが詳しくまとめてあるところがなかったのでまとめてみます。 またたしかに毎回打たなければならないのですが。。 それをより簡単にする方法を紹介したいと思います。 今回はPC(Mac)で編集することを想定しています。 jsでスマホのみにアドセンスと「スポンサードリンク」という表示をさせたいと思います。 結果から言うとこれに自分のアドセンスの設定を入れていまえばokです。 gist7001675 ここで各々変えなければいけない項目は、 google_ad_client = "ca-pub-5983151569776671"; /*