Skip to content
smartargs
EarnbackDocumentation

Daily digest

Once a day, a short message per project: yesterday’s spend, new players, cost per player, how each running test is doing, and alerts. It goes to Telegram, Slack, Discord, ntfy (phone push without an account) or any webhook.

my-game · Fri 13 Nov · 1 alert

⛔ PH – Video lab spent €131.20, above its hard limit of €125.00 (Philippines test).

Philippines test · day 8 of 14
Spent €182.40 of €293.00 expected · limit €461.00
Cost per player who opened: Google Ads €0.41 ✅ · Meta €0.92 ⚠️ (was on track)
Finished the tutorial: Google Ads 64% ✅ · Meta too early …
Earned back by its players so far: 6% (€11.02)
Next review today: Google day 7: on track for at most €0.50 per opener?

Spend Thu 12 Nov: €24.10 · Google Ads €12.00 · Meta €12.10
New players Wed 11 Nov: 58 · Google Ads 31 · Meta 9 · Unknown 18
Cost per new player 5 Nov–11 Nov: €0.38–€0.61

Complete through: Google Ads 12 Nov · Meta 12 Nov · Firebase / GA4 11 Nov · AdMob 12 Nov

How it behaves

  • Complete days only. Platforms keep revising today and yesterday, GA4 for about two days. The digest reports the last complete day of each source and says which day that is in the footer.
  • Alerts:
    • a budget past its hard limit or approval, or a pass mark past its stop level;
    • a campaign in a running test that spent nothing on a day it was active (rejected ad, declined card);
    • spend with no player credited to any paid channel for two days (tracking broke);
    • a source that failed to sync, or has nothing newer than three days ago.
  • New, still, worse. An alert is marked new the first day and “still” afterwards. Pass mark verdicts say what they were before when they change.
  • Sound only when it matters. The message plays a sound only when an alert is new or a verdict got worse; otherwise it arrives silently.
  • Once a day. --send delivers at most once per project per day; --force sends again. The digest is recorded as sent only after at least one channel accepted it, so a failed send never hides a change from the next one.
  • No days in between. If the PC was off for three days, the next digest compares with the last one sent.

Telegram

  1. In Telegram, open @BotFather, send /newbot and follow the steps. Copy the token it gives you.
  2. Run earnback connect telegram and paste the token. Earnback saves it in the workspace secrets folder.
  3. Send any message to your new bot (or add it to a group and send /start@yourbot). Press Enter in the terminal; Earnback finds the chat and runs a test call.
  4. earnback digest --send --force sends today’s digest right away.

The bot only writes to that chat. Messages longer than Telegram’s 4,096 characters are split at line breaks.

Webhooks: Slack, Discord, ntfy, JSON

Run earnback connect webhook, pick the kind and paste the URL. The URL is stored as a secret (whoever has it can post).

Kind URL Notes
slack An incoming webhook of a Slack app Slack markup is escaped.
discord Channel → Edit → Integrations → Webhooks → New Webhook → Copy URL Split at 2,000 characters; mentions are disabled, so a campaign name with @everyone pings nobody.
ntfy https://ntfy.sh/<a long random topic> (or your own ntfy server) Install the ntfy app and subscribe to the topic. The topic name is the only protection on ntfy.sh, so make it long and random. Loud digests use priority 4.
json Any endpoint POST {"digest": {...}, "text": "..."}: build your own (WhatsApp through a provider, email, a spreadsheet).

Telegram and one webhook can be active at once; the digest goes to both.

WhatsApp: Meta’s WhatsApp Business API needs a business account, approved message templates and costs per message, so Earnback doesn’t ship it. Use the json webhook with a provider of your choice, or Telegram.

Every project, every day

earnback digest --all --send       # sync every registered project and send each digest
earnback schedule --time 08:00     # prints how to run that daily

earnback schedule prints, for your system:

  • Linux / macOS: a line for crontab -e.
  • Windows: a PowerShell Register-ScheduledTask command with -StartWhenAvailable, so a morning the PC was asleep is caught up when it wakes.
  • WSL: the same Windows task, calling wsl.exe (WSL’s own cron stops whenever WSL does).

Earnback never installs the schedule itself. The once-a-day rule makes a catch-up run harmless.

Settings

Notifiers are set up once per person, not per project, in workspace.json in the Earnback config folder:

{
  "roots": ["/home/me/games/my-game"],
  "defaultRoot": "/home/me/games/my-game",
  "notify": {
    "telegram": { "enabled": true, "chatId": "123456789" },
    "webhook": { "enabled": false, "kind": "ntfy" }
  }
}

Secrets (telegram-bot-token, webhook-url) live in <earnback home>/_workspace/, or in the environment variables EARNBACK_TELEGRAM_BOT_TOKEN and EARNBACK_WEBHOOK_URL. Set "enabled": false to pause a channel.

What leaves your machine

The digest text: project, campaign and plan names, spend, player counts, rates and alert sentences. Nothing per player (Earnback has no per-player data). It is stored by the service you send it to (Telegram, Slack, Discord, ntfy.sh), under that service’s privacy terms.