This is a record of how I set up Google AdSense on adventures-after60.com. The site runs on Cloudflare Pages and GitHub, and I asked Claude Code to add the AdSense code to the head section of every page in one go; the whole job took about 30 minutes. I had been putting it off for ages because it "sounded complicated," but it turned out to be far smoother than I expected. I also cover the first thing that confused me, the difference between Google Ads and AdSense. Hopefully this is useful for anyone running a similarly built site.
A shield holding the site's page and ad slot — the single path from the ground reaching a badge that marks the new account as verified.
First Point of Confusion: Ads vs. AdSense
When I first asked about setting up "Google AdWords (Google Ads)," I was quickly corrected.
- Google Ads (formerly AdWords) → you're the advertiser, paying money to run ads
- Google AdSense → you display ads on your own site and earn revenue
What I actually wanted was the latter. Same company, same "advertising" umbrella, but completely opposite roles. I suspect plenty of people mix these up.
How This Site Is Built
This blog (adventures-after60.com) runs on the following setup:
- Hosted on Cloudflare Pages
- Source managed on GitHub
- Bilingual — Japanese and English
- Plain static HTML files (no framework)
The file structure (at the time of writing) looked roughly like this:
public/
├── index.html ← Japanese homepage
├── 404.html
├── en/
│ └── index.html ← English homepage
└── articles/
└── *.md ← blog posts (shown in a modal)
The Actual Steps
1. Apply for an AdSense account
I went to adsense.google.com and registered the site URL, then entered payment details to complete the application. Nothing tricky here.
2. Get the AdSense code
Right after applying, I was given a code snippet like this:
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXXXXXX"
crossorigin="anonymous"></script>
This needs to be inserted into the <head> tag of every page on the site.
3. Bulk-insert it across all files with Claude Code
This was the most helpful part of the whole process. I could have edited five files by hand, but instead I just asked Claude Code:
"Please insert the AdSense code right before
</head> in every .html file under public/.
Skip any file that already has it."
It inserted the code into all five files in a few seconds — and even checked for duplicates on its own.
4. Push to GitHub and deploy
git add .
git commit -m "feat: add Google AdSense code to all HTML files"
git push
Cloudflare Pages deploys automatically — it's done in a minute or two.
5. Confirm in AdSense and request review
Back in the AdSense dashboard:
- Check "I've placed the code"
- Click "Verify"
- Submit "Request review"
✅ Site ownership verification: done
✅ Review submitted: done
6. Set up the consent message (CMP)
After submitting for review, another screen appeared — configuring the cookie consent banner for users in the EU, UK, and Switzerland.
Since this site does get traffic from the UK, this step was necessary. I selected Google's two-option CMP ("Consent" / "Manage options") and submitted it. Skipping this can apparently mean losing ad revenue from UK visitors, so I made sure not to forget it.
How It Went
Total time: about 30 minutes. Far easier than I'd expected.
The Cloudflare Pages + GitHub setup makes inserting code and deploying it very clean — no hunting for plugins or shuffling between admin screens like you would with WordPress.
The bulk insertion via Claude Code was especially convenient — even as the number of files grows, it takes the same amount of work. It's also a relief that I won't have to add the AdSense code by hand every time a new post goes up (it's already in the template).
Now it's just a matter of waiting for the review. It's supposed to take 2–4 weeks (at the time of writing), so I'll spend that time building out more content.
Summary: This Round's Checklist
- ✅ Understand the difference between Google Ads and Google AdSense
- ✅ Apply for an account at adsense.google.com
- ✅ Get the AdSense code
- ✅ Insert the code into <head> on every HTML file
- ✅ Push to GitHub → deploy via Cloudflare Pages
- ✅ "Verify" then "Request review" in AdSense
- ✅ Set up the EU/UK consent message (CMP)
- ⬜ Wait for Google's review to pass (2–4 weeks)
- ⬜ Optimise ad units once approved
If you're running a static site on Cloudflare Pages and considering AdSense, I hope this walkthrough helps.
Other books you might like
You're welcome to take a look.
EAST TO WEST: The Heart of Haiku, the Light of Scripture
A quiet essay moving between the language of haiku and the light of Scripture. This is a book my father-in-law left behind.
View on AmazonCataract Surgery-A Memoir: Double cataract surgery in Osaka, Japan
Another new experience at 66 — an honest account of the cataract surgery I went through.
View on AmazonSushi Business in Britain: the complete four-volume series
A novel series following thirty-five years in the British sushi trade, from apprentice to factory manager to a small sushi school. The complete edition offers all four volumes at a better price.