AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
blodemd analytics
Manage tenant analytics integrations (GA4, PostHog) from the CLI.
blodemd analytics reads and writes the per-project analytics config that the dashboard exposes at Settings → Analytics. Use it to script rollouts, wire analytics into CI, or keep your docs repo the source of truth.
Subcommands
blodemd analytics get [--project <slug>] [--json]The project slug is resolved in this order: --project, BLODEMD_PROJECT, slug in your local docs.json. Run from inside your docs repo and you never need to pass it.
Examples
# Set GA4 for the project in the current directory
blodemd analytics set ga4 G-ABC123DEFG
# Set PostHog with the EU cloud host
blodemd analytics set posthog phc_abc123def456 --host https://eu.i.posthog.com
# Check what's configured, as JSON, so you can pipe it
blodemd analytics get --json
# Remove only PostHog, keep GA4
blodemd analytics unset posthogOptions
Validation
The CLI validates inputs before hitting the API:
- GA4 measurement ID must match
G-XXXXXXXXXX(uppercase, 4–20 alphanumerics). - PostHog project key must start with
phc_and be at least 24 characters. Personal API keys (phx_) are rejected — they have far more privilege than the project key needs and would leak to the browser. - PostHog host must be an
https://URL.
Authentication
blodemd analytics requires you to be logged in. Run blodemd login if the CLI reports you are not authenticated.