The analytics resource exposes engagement metrics — likes, comments, shares, impressions — both rolled up and per post.
Methods
| Method | What it does |
|---|---|
get(query?) | Workspace-wide metrics, optionally filtered by date / platform |
getPost(uploadId) | Per-platform breakdown for one post |
getPlatformMetrics() | Metadata about what each platform measures |
sync() | Trigger a fresh metrics pull from all platforms |
Workspace analytics
typescript
const stats = await socifyr.analytics.get({
from: '2026-01-01',
to: '2026-04-01',
platform: 'instagram', // optional filter
granularity: 'day', // 'day' | 'week' | 'month'
})
console.log(stats.summary)
// {
// totalPublished: 47,
// totalSucceeded: 45,
// totalFailed: 2,
// successRate: 95.74,
// totalLikes: 12_540,
// totalComments: 891,
// totalShares: 230,
// totalImpressions: 245_120,
// }
for (const point of stats.snapshots) {
console.log(point.date, point.likes, point.impressions)
}Per-post analytics
typescript
const post = await socifyr.analytics.getPost(uploadId)
// {
// uploadId, requestId, title, status, scheduledAt, createdAt,
// platforms: [
// {
// platform: 'instagram',
// status: 'success',
// postUrl: 'https://instagram.com/p/...',
// publishedAt: '...',
// engagement: {
// likes: 240, comments: 18, shares: 5,
// impressions: 3_500, clicks: 0, saves: 12,
// },
// },
// // ...
// ],
// }Platform metrics schema
Each platform exposes a different set of metrics. Use getPlatformMetrics() to learn what each one tracks:
typescript
const platforms = await socifyr.analytics.getPlatformMetrics()
// [
// {
// platform: 'tiktok',
// primaryImpression: 'views',
// metrics: ['likes', 'comments', 'shares', 'impressions'],
// labels: { impressions: 'Video views', likes: 'Hearts' },
// },
// // ...
// ]Manual sync
Engagement metrics auto-sync via a cron every 30 minutes. To force a refresh:
typescript
await socifyr.analytics.sync()This enqueues a background job — metrics will be up-to-date within a minute or two for most platforms.