Hi, I'm hakairyuousinn (my X account).

I count how far people get in my browser games with Google Analytics (GA4) custom events. At moments like "started," "got a result," or "pressed play again," the game sends one named event. GA4 then shows the count and number of users for each event name.

How to send them, and naming

Once the page loads GA4, the game only needs this line to send one.

gtag('event', 'game_start', { game: 'rokuro', round: 1 })

Names are lowercase English with underscores. I always add game so I know which game it came from. Nothing that identifies a person, like a name or email address, gets sent.

To break the numbers down by the extra values (game, round, result, rank, method), register them under "Custom definitions" in the GA4 admin screen. Data collected before you register can't be broken down, so it's best to register them before the game goes out.

The events Rokuro sends

My pottery game "Rokuro" sends these.

  • game_start (started making a pot, with which round it is)
  • appraise (the finished pot got a price)
  • replay (pressed "play again" on the result screen)
  • restart (started over midway)
  • share (shared the result on X)
  • shared_view (someone opened the game from a shared link)
  • more_games (clicked the link to other games)
A horizontal bar chart of Rokuro events: game_start 108,881, appraise 72,436, replay 67,417, restart 35,487, more_games 3,055, share 668, shared_view 319
Counts over 7 days, November 12 to 18 (GA4)

A week of Rokuro numbers

In the 7 days from November 12 to 18, pots were started 108,881 times and got a price 72,436 times. About 2 out of 3 were made all the way through. There were also 35,487 restarts midway.

"Play again" was pressed 67,417 times, about 90% of the number of priced pots. People look at the result and go right on to make another one.

Sharing was the low one, at 668. My plating game "Chez Weeds" had 5,097 shares in the same 7 days, and shared links were opened 13,017 times. That works out to each share being opened more than twice.

I first sent them through Cloudflare Zaraz

At first I sent events through a Cloudflare service called Zaraz. Then on November 1, the day Rokuro came out, it used up the free 1 million events per month in a single day. The next day I switched to loading GA4 directly from the page. Older games still send events the Zaraz way, so the page has a small bridge that passes them on to GA4.

The play counts on the game cards on my games page are these game_start numbers too. Only games with 1,000 or more show a count.

▶ Play Rokuro ▶ Go to the games