Skip to content

Analytics

View platform-level and per-post analytics from the OpenQuok CLI over a 7, 30, or 90 day window.

2 min read

Connect your agent today

Draft from chat, review in your calendar, and publish only what you approve.

Start for $0

Overview

The analytics:* wraps the Analytics APIs. Two commands cover the supported windows:

  • analytics:platform — channel-level metrics (followers, impressions, engagement, …).
  • analytics:post — per-post metrics (likes, comments, shares, …) for a **published** post.

Platform analytics

openquok analytics:platform <integration-id>
openquok analytics:platform <integration-id> -d 30
openquok analytics:platform <integration-id> -d 90
FlagDescription
-d --daysLook-back window. One of 7 (default), 30, or 90.

The response is an array of metric series, each with daily data points and a percentageChange summary:

[
  {
    "label": "Followers",
    "data": [
      { "total": "1250", "date": "2026-05-01" },
      { "total": "1280", "date": "2026-05-02" }
    ],
    "percentageChange": 2.4
  },
  {
    "label": "Impressions",
    "data": [
      { "total": "5000", "date": "2026-05-01" },
      { "total": "5200", "date": "2026-05-02" }
    ],
    "percentageChange": 4.0
  }
]

Scripting examples

Extract just the followers series:

openquok analytics:platform <integration-id> -d 30 
  | jq '.[] | select(.label=="Followers")'

Show only the percentage change for every metric:

openquok analytics:platform <integration-id> 
  | jq '.[] | {label, percentageChange}'

Compare two channels side-by-side:

for ID in "$THREADS_ID" "$INSTAGRAM_ID"; do
  echo "=== $ID ==="
  openquok analytics:platform "$ID" -d 30 
    | jq '.[] | {label, percentageChange}'
done

Post analytics

openquok analytics:post <post-id>
openquok analytics:post <post-id> -d 30
FlagDescription
-d --daysLook-back window. One of 7 (default), 30, or 90.

Response shape mirrors analytics:platform. Common metrics:

[
  {
    "label": "Likes",
    "data": [
      { "total": "150", "date": "2026-05-01" },
      { "total": "175", "date": "2026-05-02" }
    ],
    "percentageChange": 16.7
  },
  {
    "label": "Comments",
    "data": [
      { "total": "25", "date": "2026-05-01" },
      { "total": "30", "date": "2026-05-02" }
    ],
    "percentageChange": 20.0
  }
]

Scripting examples

Filter to a single metric label (e.g. just Likes):

openquok analytics:post <post-id> -d 30 
  | jq '.[] | select(.label=="Likes")'

Show only the percentage change for every post metric:

openquok analytics:post <post-id> 
  | jq '.[] | {label, percentageChange}'

Get just the latest total for each metric:

openquok analytics:post <post-id> -d 30 
  | jq '.[] | {label, latest: .data[-1].total}'

Diff a row’s metrics before and after a campaign:

openquok analytics:post <post-id> -d 7  > before.json
openquok analytics:post <post-id> -d 30 > after.json
jq -s '
  [.[0], .[1]]
  | map([.[] | {label, total: (.data[-1].total | tonumber)}])
  | { before: .[0], after: .[1] }
' before.json after.json
Search documentation
Find a docs page
Discord Support