CCFish automates player re-engagement by analyzing real-time player behavior across 12+ engagement signals through Cloudflare Workers, segmenting dormant users into targeted cohorts, and triggering hyper-personalized push notifications from a D1-backed campaign engine — all without manual intervention.

The Problem — Player Churn in Mobile Fishing Games

Mobile fishing simulation games face a unique churn problem. Unlike hyper-casual titles with session times measured in seconds, CCFish players invest meaningful time — tournaments run 3–5 minutes, seasonal events span weeks, and progression systems encourage daily logins. Yet even dedicated players drift away. The data told a clear story: 42% of new players churned within the first 7 days, and 68% of monthly active users who missed three consecutive daily logins never returned.

Generic push notifications made things worse. A one-size-fits-all "Come back and play!" message sent at 9 AM to every dormant player ignored time zones, play styles, and behavioral history. Players who preferred深夜 tournament sessions received morning pings. Completionists who had grinded for the "Legendary Marlin" rod got the same generic nudge as casual pond-fishers. The result? Click-through rates hovered at 2.1%, and 14% of users opted out of notifications entirely within the first month.

The core issue was clear: mobile gamers have developed notification blindness. They've been bombarded by generic retargeting from every app on their phone. To cut through the noise, CCFish needed a system that treated each notification as a unique value proposition — not a reminder, but a relevant invitation.

The Solution — CCFish's Automated Push Notification System Architecture

CCFish's re-engagement system is built on three architectural pillars:

1. **Behavioral Signal Collection** — Every player interaction — tournament placement, bait selection, purchase history, session duration, social referrals, and even idle-time scrolling patterns — feeds into a real-time signal pipeline.

2. **Dynamic Segmentation Engine** — A serverless Worker fleet processes these signals against configurable trigger rules, assigning players to micro-segments like "Lost Tournament Finalist — 3 days dormant" or "Unused Premium Lure — 7 days dormant."

3. **Campaign Orchestration Layer** — Once segmented, players enter automated campaigns that deliver personalized push notifications at optimal send times based on their historical engagement windows.

This architecture replaces the old batch-and-blast approach with a continuous, event-driven system that operates on per-player cadence.

Architecture Overview — Cloudflare Workers + D1 + Player Segmentation

The entire automation stack runs on Cloudflare's edge network, chosen for its global reach (players in 85 countries), low latency (sub-50ms Worker execution), and serverless pricing that scales to zero during low-traffic hours.

**Data Layer — D1 Database:** Player profiles, behavioral events, and campaign states live in Cloudflare D1, a serverless SQLite database. Each player record includes:

- Session history (last login, session duration percentiles, peak play hours)

- Progression state (level, tournaments entered, top fish caught)

- Transaction history (purchase recency, favorite bait/lure categories, referral count)

- Notification preferences (opted-in, muted campaigns, preferred language)

**Signal Processing — Workers:** A dedicated Worker (`signal-ingestor`) receives player events via a persistent WebSocket connection from the Cocos Creator client. It batches events in 30-second windows and writes to D1, then triggers a secondary Worker (`segment-evaluator`) that runs segmentation rules asynchronously via Durable Object alarms.

**Segmentation Rules — Configurable JSON:** Marketing managers define segments in a version-controlled JSON schema living in Workers KV:

```json

{

"segments": [

{

"id": "lost-finalist-3d",

"condition": "tournament_placement IN (2,3) AND days_since_last_session >= 3",

"priority": 10,

"campaign": "comeback-prize",

"notification_template": "so_close_prize",

"cooldown_days": 14

},

{

"id": "unused-premium-lure-7d",

"condition": "purchased_premium_lure = true AND days_since_last_session >= 7",

"priority": 15,

"campaign": "lure-reminder",

"notification_template": "premium_lure_waiting",

"cooldown_days": 21

}

]

}

```

Each condition is a SQL-adjacent expression evaluated at query time against the player's D1 profile. Priority values resolve conflicts when a player qualifies for multiple segments — the highest priority wins.

**Push Delivery — Firebase Cloud Messaging:** The `notifier` Worker constructs notification payloads using Handlebars templates stored in Workers KV, merges player-specific data, and dispatches via FCM's HTTP v1 API. An exponential backoff retry mechanism handles transient delivery failures, and delivery receipts are logged back to D1 for analytics.

Implementation — Building Segments, Triggering Notifications, Measuring Engagement

**Segment Building Pipeline:**

1. Every 15 minutes, a cron-triggered Worker (`segment-cron`) queries D1 for players whose `days_since_last_session` exceeds the minimum threshold across all active segments.

2. For each candidate player, the Worker runs a SQL query filtered by the player's attributes, evaluating all segment conditions in a single pass.

3. Matched players are inserted into a `campaign_queue` table with a `scheduled_send_at` timestamp calculated from their personal `optimal_send_hour` — derived from the player's 90th percentile session start time over the last 30 days.

4. A separate delivery Worker polls the `campaign_queue` every 60 seconds, selecting players whose `scheduled_send_at` has passed and whose `notification_state` is `pending`.

**Notification Templates — Personalization Variables:**

Each template pulls from player data at send-time:

- `{{player_name}}` — personalized greeting

- `{{last_tournament_rank}}` — "You came in 2nd!"

- `{{unused_item_name}}` — "Your Golden Lure is waiting"

- `{{time_since_last_play}}` — "It's been 5 days"

- `{{referral_bonus}}` — "3 friends are ready to join"

Example rendered notification for a player who lost a tournament final and hasn't played in 4 days:

> "Hey {{player_name}}, 2nd place in the Coral Reef Cup — so close! Come back tonight and we'll credit a free entry token to help you claim the win."

**Measurement Loop — Engagement Attribution:**

Every notification send creates an `engagement_event` record in D1 with a `campaign_id`, `segment_id`, and a unique `notification_id`. When the player opens the app, the client sends a `session_start` event that includes the `notification_id` if the launch came from a push notification. This creates a closed-loop attribution pipeline:

1. Open rate = sessions directly attributed / notifications delivered

2. Re-engagement rate = players who played 3+ sessions within 7 days of notification / players notified

3. Revenue recovery = IAP revenue from re-engaged players within 14 days of notification

A Grafana dashboard (powered by D1's HTTP API) surfaces these metrics in real-time, segmented by campaign, segment, and player tier.

Results — Concrete Metrics on Re-Engagement Rates

After deploying the hyper-personalized push notification system, CCFish observed the following results over a 90-day period:

| Metric | Before (Generic Push) | After (Personalized) | Improvement |

|---|---|---|---|

| Push notification CTR | 2.1% | 8.7% | +314% |

| 7-day re-engagement rate | 5.3% | 18.2% | +243% |

| 30-day retention of re-engaged players | 12.1% | 31.4% | +160% |

| Notification opt-out rate (monthly) | 14.0% | 3.2% | -77% |

| Revenue from re-engaged players (per-user 14-day LTV) | $0.42 | $1.87 | +345% |

The "Lost Tournament Finalist" segment consistently outperformed other cohorts, achieving a 22.4% re-engagement rate within 72 hours — players who narrowly lost a competitive match were highly motivated by a "free rematch token" incentive. The "Unused Premium Lure" segment, despite having a longer dormancy threshold (7 days), showed the highest per-user revenue recovery at $2.34 per re-engaged player.

Crucially, the opt-out rate dropped from 14% to 3.2% monthly. Players who received personalized, relevant notifications were significantly less likely to mute the channel entirely — a strong signal that notification quality directly impacts channel trust.

Key Takeaways

1. **Relevance beats frequency.** Sending fewer, but hyper-personalized push notifications to the right segment at the right time dramatically outperforms blast campaigns. CCFish sends 60% fewer notifications overall but achieves 4x the click-through rate.

2. **Serverless edge computing makes real-time segmentation practical.** Cloudflare Workers + D1 enables sub-second segment evaluation without managing infrastructure, at a cost of roughly $18/month for 50K daily active users.

3. **Closed-loop attribution is non-negotiable.** Without tying notification delivery to session attribution, you're optimizing campaign decisions on guesswork. The D1-based attribution pipeline was the single most impactful analytics investment.

4. **Game context matters more than player demographics.** A tournament loss is a stronger re-engagement signal than age, location, or device type. Build segments around in-game emotional moments — near-wins, unused purchases, social invitations — not demographic tags.

5. **Opt-out rate is the canary in the coal mine.** If your opt-out rate exceeds 5%, your notification strategy is damaging your user base. Fix relevance first, then worry about volume.

6. **Automate the loop, but keep templates human.** The automation handles segmentation, timing, and delivery, but the notification copy itself reads like a message from a thoughtful game master, not a marketing robot. Invest writing time in templates, not playbooks.