Menu

1 / 2

Analytics for 10 social networks: polling post stats by age, and why NULL isn't zero

DEV Community: go·Nazma Akter·4 days ago
#M60vDBqE
#devtogo#devto#dev#views#null
Reading 0:00
15s threshold

VeloxonHub Social has an Analytics page that shows views, reactions, comments and shares for everything you publish through it, across Facebook, Instagram, YouTube, LinkedIn Pages, Threads, Bluesky, Mastodon, Tumblr, DEV.to and WordPress, plus a daily follower count per account. None of these networks push numbers to you, so it's all polling. Here's how we keep that cheap and honest.

Two tables, nothing clever

-- Latest snapshot per published target. NULL = the platform doesn't report it. CREATE TABLE post_metrics ( post_target_id UUID PRIMARY KEY REFERENCES post_targets ( id ) ON DELETE CASCADE , platform social_platform NOT NULL , views BIGINT , likes BIGINT , comments BIGINT , shares BIGINT , error TEXT , -- last fetch error, e.g. missing permission fetched_at TIMESTAMPTZ NOT NULL DEFAULT now () );

-- One follower count per account per day.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.