The Timezone Problem

CCFish operates in 20+ markets across every major timezone. When a marketing campaign sends push notifications at 10 AM Pacific, players in Tokyo get it at 2 AM the next day. They wake up to a stale offer, click rates plummet, and the campaign's ROI tanks. This is not a minor inconvenience -- it is a fundamental design flaw in how most mobile games handle global push notification campaigns.

The naive solution -- send everything at the player's local 10 AM -- requires player timezone data, a scheduling engine, and per-market campaign configurations. Most game studios outsource this to third-party services that charge per-notification and add latency. CCFish took a different approach: build an in-house timezone-aware push notification automation system on their existing Cloudflare Workers infrastructure, with zero third-party dependencies.

Architecture: Workers + D1 + Queue Scheduling

The system has three distinct layers that work together to deliver every notification at the optimal time for each player.

**Layer 1: Player Timezone Detection (D1 + Edge Analytics)**

When a player opens the game, the Cloudflare Worker records their request headers (CF-IPCountry, Accept-Language) and estimates their timezone. Over 3-5 sessions, the system builds a confidence score. Once confidence reaches 80%, the timezone is locked in D1. Players without enough data get a conservative UTC+8 default -- the largest single player cohort. The detection is passive and adds zero latency to game loads.

**Layer 2: Campaign Queue (D1 + Cron Triggers)**

Each campaign is stored as a row in D1 with fields for message template, segment targeting rules, and allowed send windows. A Cloudflare Workers cron trigger runs every 15 minutes, querying for players whose local time falls within the campaign's active send window. For each eligible player, it inserts a notification job into a queue table with the player's preferred language, device platform, and campaign metadata.

**Layer 3: Push Dispatcher (Workers + Firebase/APNs)**

A separate Worker polls the notification queue every 30 seconds. It batches push notifications by platform and sends them via the respective platform APIs. Batches are capped at 500 notifications per API call to stay within platform rate limits. Failed sends are retried up to 3 times with exponential backoff and then logged for token cleanup.

Results: 3.4x Click-Through Rate Improvement

After implementing timezone-aware push notification scheduling, CCFish measured dramatic improvements:

- **3.4x increase** in push notification click-through rate (4.2% to 14.3%)

- **22% improvement** in day-7 retention for re-engagement campaigns

- **55% reduction** in push notification opt-out rate

- **$0 additional infrastructure cost** -- runs on existing Workers + D1

The before-and-after comparison is stark. A typical re-engagement campaign before timezone awareness: 500,000 notifications sent globally at a fixed 10 AM Pacific, generating 21,000 clicks (4.2% CTR). After timezone-aware scheduling: the same 500,000 notifications delivered at each player's local optimal time, generating 71,500 clicks (14.3% CTR). That is 50,500 additional engaged players from zero additional spend.

Operationally, the system processed over 12 million timezone-aware notifications in its first month with a 99.97% delivery success rate. The cron-based approach uses approximately 1,200 Workers invocations per day, well within Cloudflare Free plan limits for most accounts.

Implementation: The Campaign Template System

Marketing managers create campaigns using JSON templates that the system interprets as scheduling rules:

```json

{

"campaign": "weekend-gem-sale",

"message": {

"en": "Weekend gem sale: 2x value this Saturday only!",

"ja": "Weekend sale: check now!",

"ko": "Weekend gem sale: 2x value!"

},

"segments": ["dolphin", "whale"],

"send_window": "09:00-11:00 local",

"max_per_day": 1

}

```

The system handles translation at send time, not at campaign creation time. A single campaign template covers all 20 markets without duplicating scheduling logic. The LLM-powered translation pipeline generates localized message variants on-the-fly and caches them in D1 with a 7-day TTL.

Multi-Channel Orchestration

The timezone-aware scheduling engine also powers in-app messages and email notifications. When a player misses a push notification (no interaction within 2 hours), the system escalates to an in-app banner on next login, then to email after 48 hours of inactivity. Each escalation respects the player's timezone and preferred channel mix.

This multi-channel orchestration increased total re-engagement rate from 14% (push-only) to 31% (push + in-app + email). The automation ensures no channel fires outside the player's waking hours -- a 2 AM email is just as bad as a 2 AM push notification. The system tracks each channel's last-send timestamp per player to prevent channel fatigue and notification spam.

Key Takeaways

Timezone-aware notification delivery is one of the highest-ROI marketing automation investments a global mobile game can make. The infrastructure required -- Cloudflare Workers, D1, and platform push APIs -- is already available in most game stacks. The missing piece is the scheduling logic that connects player timezone data to campaign delivery windows. CCFish's implementation shows that solving this serverlessly can deliver 3-4x engagement improvements with zero marginal infrastructure cost.