Skip to content

docs(analytics): list the platforms with per-post metrics and complete the TikTok row - #245

Open
giladresisi wants to merge 1 commit into
mainfrom
docs/analytics-per-post-platforms
Open

docs(analytics): list the platforms with per-post metrics and complete the TikTok row#245
giladresisi wants to merge 1 commit into
mainfrom
docs/analytics-per-post-platforms

Conversation

@giladresisi

@giladresisi giladresisi commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a "Per-post metrics" section to the Analytics guide listing the 12 platforms whose provider reports per-post statistics. The list is a generated region written by scripts/sync-facts.mjs (new post-analytics region, derived from which providers implement postAnalytics), so it cannot drift from the app. It points out that Dribbble and TikTok Business report per-post metrics but have no account-level analytics.

Links the opening paragraph of the Analytics page and the Statistics note on the post actions page to this section.

Completes the TikTok row in "What each platform reports" with the metrics the provider actually returns (views, recent likes, recent comments, recent shares).

Why

A customer using the public per-post analytics endpoint on TikTok posts reported three things: the endpoint returned an empty array for their posts, the post's releaseURL was the channel's profile link rather than the video, and when they tried to find out which platforms support per-post metrics at all, the docs sent them in a loop. The Analytics page said per-post numbers live on the post, and the post page said to see Analytics for which platforms report them, with neither page listing them.

This PR fixes the loop and the list. The TikTok empty-array and releaseURL behaviour depend on an app change (gitroomhq/postiz-app#2007) and are documented in a separate PR gated on that deploy.

While checking the list, the TikTok account-level row turned out to list 4 of the 8 metrics the provider returns. The other rows were checked against each provider's analytics() labels and match.

Testing

Rendered the Analytics and Post actions pages locally with mint dev in a real browser: the new section, the anchor links and the table render without overflow. node scripts/check-docs.mjs --changed and node scripts/check-prose.mjs --changed pass. Running the generator against the app repo only changes the new region; the existing analytics table is untouched.

Not gated on any deploy.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Roikk7Asuuix92LqWmpNop

Summary by CodeRabbit

  • Documentation
    • Added a dedicated Per-post metrics section to the Analytics documentation.
    • Expanded TikTok account-level metrics coverage to include views, recent likes, comments, and shares.
    • Documented which platforms provide per-post statistics, including Dribbble and TikTok Business.
    • Updated the Statistics documentation link to point directly to the per-post metrics section.
    • Added automated generation of the documented post-analytics platform table.

…e the TikTok row

Adds a "Per-post metrics" section to the Analytics guide, generated from
the app repo by scripts/sync-facts.mjs (new post-analytics region derived
from which providers implement postAnalytics), links the opening paragraph
and the Statistics note on the post actions page to it, and completes the
TikTok row in "What each platform reports" with the metrics the provider
actually returns.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Roikk7Asuuix92LqWmpNop
@postiz-contribution postiz-contribution Bot added the contribution:approved Approved contributor label Sep 2, 2026
@postiz-agent

postiz-agent Bot commented Sep 2, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 0d8fc867-9759-4dff-9b4d-1b3818ae23cb

📥 Commits

Reviewing files that changed from the base of the PR and between 227f80e and be78782.

📒 Files selected for processing (3)
  • general/analytics.mdx
  • general/posts/actions-and-stats.mdx
  • scripts/sync-facts.mjs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The sync script now generates a per-post analytics table from provider implementations. The Analytics documentation adds this table, expands TikTok metrics, and updates links to the new section.

Changes

Per-post analytics documentation

Layer / File(s) Summary
Generate per-post analytics data
scripts/sync-facts.mjs
The script scans providers for postAnalytics methods, formats platform names, and includes the table in print and update/check output.
Document per-post metrics
general/analytics.mdx, general/posts/actions-and-stats.mdx
The documentation adds the per-post metrics table, expands TikTok account metrics, and links directly to the new section.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to be787

This PR updates analytics documentation and its generated platform list without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Suggested reviewers: egelhaus

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the two main changes: adding platforms with per-post metrics and completing the TikTok account-level metrics row.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/analytics-per-post-platforms

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution:approved Approved contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant