Configure analytics

From IgorGanapolsky/ThumbGate · View interactive version

Configure analytics is an AI agent skill from the GitHub repository IgorGanapolsky/ThumbGate. Repeatable skill for setting up Plausible, PostHog, and GA4 analytics keys

How to use this skill

Skill file

Skill: Configure Analytics

Repeatable skill for setting up Plausible, PostHog, and GA4 analytics keys

in both local .env and Railway production environment variables.

When to use

Prerequisites

Steps

1. Gather keys from dashboards

Plausible API key:

PostHog project API key:

GA4 Measurement ID:

2. Set local .env

Write/update repo/.env with:

PLAUSIBLE_API_KEY=<key>
PLAUSIBLE_SITE_ID=thumbgate-production.up.railway.app
POSTHOG_API_KEY=<phc_key>
THUMBGATE_GA_MEASUREMENT_ID=<G-ID or leave commented>

3. Set Railway production vars

Option A — Railway CLI or GitHub deploy variables (preferred):

gh secret list --repo IgorGanapolsky/ThumbGate
gh variable list --repo IgorGanapolsky/ThumbGate

If Railway CLI auth works, set variables with railway variables set.

If Railway CLI reports invalid_grant, use the GitHub PR/deploy path and the

Railway dashboard in Chrome. Do not direct-push to main; use a focused branch,

PR, required checks, and branch-protected merge.

Option B — Chrome (if MCP not authenticated):

4. Verify

# Local: run Plausible poller
npm run social:poll:plausible

# Production: check instrumentation scripts and health
curl -fsS https://thumbgate.ai/health
curl -fsS https://thumbgate.ai/checkout/pro | grep -E 'plausible|posthog|G-[A-Z0-9]+'

Current values (last updated 2026-05-26)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.