Some years ago I found myself in the middle of a viral moment. It was a wild ride, involving a lion, Jimmy Kimmel and a world-famous university.
I worked for the University of Oxford at the time. My department, the central fundraising office, ran a central donation platform. Most of the colleges and departments had pages on the website to accept gifts.
I happened to share an office with the staff who did the admin that accompanied donations. One afternoon, by pure chance, I happened to overhear two of them discussing how busy things were that day. My week rapidly unravelled.
It turns out that the illegal hunting of a lion had made the news around the globe. But this lion, known as Cecil, had long been monitored by the Conservation Unit at the University of Oxford. The head of their department somehow got invited onto the Jimmy Kimmel show to talk about the event.
Lots of viewers were moved by the segment and wanted to give. And our donation platform was their destination. That day we had a 7,000% increase in the number of donations. It was a wild time, as we tried to keep the website up and make the most of the viral moment.
As I reflect, I often think - how could I get an early warning of this sort of event? Time is so critical when you have a large traffic surge. You might only have minutes before your website goes under. In this case I knew quickly because I happened to share an office with some staff from finance.
Could Google Analytics help me with this?
The best way I have found is to use Custom Insights. Sadly, there isn't enough space to provide a full guide to the feature here. Here is Google's guide to Custom insights.
For this particular purpose, the key was to set the evaluation frequency to Hourly. My tests have found that there's a sizeable delay for Daily frequency: email notifications come through 11-28 hours after the end of the day. That's far too long for this sort of situation.
By contrast, a Custom Insight based on Hourly frequency usually delivers results an hour after the time period concerned. For example, an insight from the period 9-10am on a particular day gets delivered by email at 11am that day.
What metric do you use for the insight? In a viral situation I'm most concerned about the amount of work for the server. Will it fail? I think the best metric for this situation is Views. If you are cloud hosted, and are confident in your host's ability to scale up, then you may pick a metric based on maximising impact.
Hourly traffic is unusual: it currently doesn't show up anywhere in Google Analytics. So I had to experiment to set this up. To begin with I wanted to trigger the insight frequently, so I picked a low value for my test-site: 50 views an hour. Then I waited for the first notification. That came, so I was comfortable the mechanism was working.
Over a period of a week I then boosted the trigger value to: 100, 200, 300 views. I kept going until I got to a level that wasn't reached with typical traffic fluctuations.
The currently value should give me a useful early warning for a viral surge. What would I do then? Probably all of these things:
- Go to the Realtime reports to identify some details: Where is the traffic going? Which part of the world is it coming from?
- Warn my hosting provider and ask if they can increase the resources to the server.
- Prepare my outage pages for the worst. Can I point to an alternative location, such as a social media post, that will help the users complete their task if the website fails?
If you're paying close attention, you'll notice that I said 'usually'. Why was that? Well, my experiments have found that Hourly Custom Insights aren't triggered in a portion of cases - about 7%. I guess one has to see this approach as a helpful aid rather than a fool proof system.
Can you see a better way to do this in Google Analytics, or another package? Do let me know via Blue Sky or Threads.
Get the latest
Sign-up to the email list to hear about new posts.