GA4 Annotations (in a sheet)
- doug56778
- 16 hours ago
- 2 min read
In the long ago, barely remembered days of Universal Analytics, old GA had the [limited] ability to add notes to your data. Limited in that is wasn't available in all reports, the note related to one day, and there was no API (hat tip to old friend Grant Kemp for the handy screen shot):

But life was good! Until it wasn't. But now it is again and (IMHO) it's better (but not yet perfect). Annotations are back, hurrah! They can span dates AND there's an API!
There's an API, and here's a Google Sheet that uses it
Getting straight to the useful part, not being the first, but I've built this sheet for you to take a copy and manage your annotations from a Google sheet! Having taken a copy, pop your GA4 property ID in cell A2 and click the "Get Annotations" arrow - you'll probably need to do standard Google authorisation stuff first:

You can modify existing annotations, add new, and delete. Rows without ID values will be added as new annotations.
The date format needs to be dd/mm/yyyy - dd/mm/yyyy So for this month so far: 1/04/2025 - 14/04/2025
Test the sheet on a test property. Don't break your annotations using this sheet on your production data set - use with caution, be responsible with your data!
It's simple - as in, basic, fairly lacking in functionality - and that's with good reason. Imagine hooking this up to the Google Ads API and automatically adding annotations for new campaigns?
To demonstrate how you might take this basic sheet and automate it further, I've hooked it up to our GTM pipeline - very similar to this recent post by Tamás Geiger.
This is a simple extension of my SuperWeek 2025 Golden Punchcard submission. On publication, we detect the container version change in sGTM, and then via Cloud Run Functions and Pub/Sub, we send a Slack message, update the version in BQ, Firestore, and now add the annotation too:


This requires an "On Change" trigger in the sheet:

See how extensible this is? See how useful the data is?
The good, the bad, and the future
A neat new use case for annotations is the system generated annotations as seen recently:

There' s not a huge amount of real estate (60 char title, 150 char body) to get information into your annotation as you can see in our example below:

What you can see is that the annotation spans a date range quite clearly, it's coloured and I've added markup - an html link - in the annotation body - perversely, I actually added the whole Duga Digital site in an iframe and it worked for which I am deeply regretful.
Ideally the link will point to another resource (sheet, knowledge base, git hub repo, you get the idea), and the lack of space will not be an issue.
But.
I've not yet moved the mouse fast enough to click the link. I'd love to see the annotation hang around for just a little longer to be clickable. Failing that, I'd like to see the markup rendered in the right hand panel - not raw like so:

I think the raw markup is only valid when editing:

Comments