Skip to main content

Overview

Postiz Analytics provides comprehensive insights into your social media performance. Track engagement, reach, impressions, and other key metrics across all your connected platforms from a unified dashboard.

Supported Platforms

Analytics are available for the following platforms:

Facebook

Pages, reach, engagement, post clicks

Instagram

Posts, stories, reach, impressions, engagement

LinkedIn

Page analytics, impressions, engagement, clicks

X (Twitter)

Impressions, engagement, likes, retweets

YouTube

Views, watch time, engagement, subscriber growth

TikTok

Views, likes, comments, shares

Pinterest

Impressions, saves, clicks, engagement

Google Business

Profile views, search queries, actions

Threads

Views, likes, replies, reposts
// Supported platforms for analytics
const allowedIntegrations = [
  'facebook',
  'instagram', 
  'instagram-standalone',
  'linkedin-page',
  'tiktok',
  'youtube',
  'gmb',
  'pinterest',
  'threads',
  'x'
];

Analytics Dashboard

Accessing Analytics

Navigate to the Analytics section from the main menu to view your performance metrics.
// Analytics API endpoint
GET /analytics/:integration?date=<days>

// Fetch analytics for a specific integration
const analytics = await fetch(
  `/analytics/${integration.id}?date=${days}`
).json();

Time Range Selection

Choose from different time ranges based on platform support:
Available for all supported platforms. Best for tracking short-term trends.
const options = [{
  key: 7,
  value: '7 Days'
}];

Platform-Specific Metrics

Facebook Analytics

  • Page Impressions - Total times your page was viewed
  • Post Reach - Unique users who saw your posts
  • Post Engagement - Likes, comments, shares, and clicks
  • Page Likes - New likes during the period
  • Post Clicks - Clicks on your posts
interface FacebookMetrics {
  impressions: number;
  reach: number;
  engagement: number;
  likes: number;
  clicks: number;
  timeSeriesData: Array<{
    date: string;
    value: number;
  }>;
}

Instagram Analytics

  • Impressions - Total times your content was viewed
  • Reach - Unique accounts reached
  • Profile Views - Profile visit count
  • Engagement - Likes, comments, saves, shares
  • Follower Growth - New followers gained
interface InstagramMetrics {
  impressions: number;
  reach: number;
  profileViews: number;
  engagement: number;
  followerGrowth: number;
  topPosts: Array<{
    id: string;
    mediaUrl: string;
    likes: number;
    comments: number;
  }>;
}

LinkedIn Analytics

  • Impressions - Times your content was shown
  • Clicks - Clicks on your content
  • Engagement - Likes, comments, shares
  • Follower Growth - New followers
  • Engagement Rate - Engagement percentage
interface LinkedInMetrics {
  impressions: number;
  clicks: number;
  engagement: number;
  followers: number;
  engagementRate: number;
}

X (Twitter) Analytics

X analytics require additional configuration and may have rate limits.
interface XMetrics {
  impressions: number;
  engagements: number;
  likes: number;
  retweets: number;
  replies: number;
  urlClicks: number;
  profileClicks: number;
}

Post-Level Analytics

View detailed analytics for individual posts:

Accessing Post Analytics

// Click on any published post in the calendar
const openStatistics = (postId: string) => {
  modal.openModal({
    title: 'Statistics',
    children: <StatisticsModal postId={postId} />
  });
};

// API endpoint
GET /analytics/post/:postId?date=<timestamp>

const postAnalytics = await fetch(
  `/analytics/post/${postId}?date=${timestamp}`
).json();

Post Statistics Modal

1

Open Post Statistics

Click the statistics icon on any published post in the calendar.
2

View Metrics

See platform-specific metrics for that individual post:
interface PostStatistics {
  id: string;
  publishDate: string;
  platform: string;
  content: string;
  metrics: {
    impressions?: number;
    reach?: number;
    engagement?: number;
    likes?: number;
    comments?: number;
    shares?: number;
    clicks?: number;
    saves?: number;
  };
}
3

Compare Performance

View how this post performs compared to your average metrics.

Analytics Components

Channel Analytics Sidebar

The analytics page features a collapsible sidebar showing all channels with available analytics:
const PlatformAnalytics = () => {
  const [current, setCurrent] = useState(0);
  const [key, setKey] = useState(7); // Default to 7 days
  
  const { data } = useSWR('analytics-list', async () => {
    const integrations = await fetch('/integrations/list').json();
    return integrations.filter(f => 
      allowedIntegrations.includes(f.identifier)
    );
  });
  
  return (
    <>
      <Sidebar channels={data} current={current} onSelect={setCurrent} />
      <AnalyticsView 
        integration={data[current]} 
        dateRange={key} 
      />
    </>
  );
};

Rendering Analytics Charts

import { RenderAnalytics } from '@gitroom/frontend/components/platform-analytics/render.analytics';

const AnalyticsView = ({ integration, date }) => {
  return (
    <div className="flex-1">
      <RenderAnalytics 
        integration={integration} 
        date={date} 
      />
    </div>
  );
};

Channel Status Indicators

Channels display status indicators in the analytics sidebar:
Channel is connected and analytics are available.
<div className="opacity-100">
  <ChannelIcon integration={integration} />
</div>

Refreshing Analytics Data

Analytics data is cached and refreshed periodically:
const { data, mutate } = useSWR(
  `analytics-${integration.id}-${dateRange}`,
  () => fetchAnalytics(integration.id, dateRange),
  {
    revalidateOnFocus: false,
    revalidateOnReconnect: false,
    refreshInterval: 300000 // Refresh every 5 minutes
  }
);

// Manual refresh
const refreshAnalytics = () => {
  mutate();
};

Exporting Analytics Data

Export functionality is coming soon. Currently, you can view analytics in the dashboard.

Integration Service

Analytics are fetched through the integration service:
// Backend: analytics.controller.ts
@Get('/:integration')
async getIntegration(
  @GetOrgFromRequest() org: Organization,
  @Param('integration') integration: string,
  @Query('date') date: string
) {
  return this._integrationService.checkAnalytics(
    org, 
    integration, 
    date
  );
}

@Get('/post/:postId')
async getPostAnalytics(
  @GetOrgFromRequest() org: Organization,
  @Param('postId') postId: string,
  @Query('date') date: string
) {
  return this._postsService.checkPostAnalytics(
    org.id, 
    postId, 
    +date
  );
}

Error Handling

Handle analytics errors gracefully:
const fetchAnalytics = async () => {
  try {
    const response = await fetch(
      `/analytics/${integration.id}?date=${days}`
    );
    
    if (!response.ok) {
      throw new Error('Failed to fetch analytics');
    }
    
    return await response.json();
  } catch (error) {
    console.error('Analytics error:', error);
    toaster.show('Failed to load analytics', 'error');
    return null;
  }
};
Some platforms have rate limits on analytics API calls. If you see errors, try again after a few minutes.

Analytics Limitations

  • X (Twitter) - May require premium API access for detailed analytics
  • Instagram - Business or Creator account required
  • TikTok - Business account required for analytics
  • Historical Data - Most platforms limit historical data to 90 days
  • Real-time - Analytics may have a 24-48 hour delay

Best Practices

Regular Monitoring

Check analytics weekly to track trends and adjust your strategy.

Compare Time Periods

Use different time ranges to identify seasonal patterns.

Track Top Posts

Identify your best-performing content and create similar posts.

Monitor Engagement Rate

Focus on engagement rate rather than just follower count.

Troubleshooting

  1. Ensure the channel is properly connected
  2. Check if the platform supports analytics
  3. Verify you have the required account type (Business/Creator)
  4. Try refreshing the connection

API Reference

EndpointMethodDescription
/analytics/:integrationGETGet channel analytics
/analytics/post/:postIdGETGet post-specific analytics
/integrations/listGETList integrations with analytics

Next Steps

Post Scheduling

Optimize posting times based on analytics insights

AI Features

Use AI to create content optimized for engagement

Build docs developers (and LLMs) love