How to Build a Reputation Score Tracking System
Track your online reputation score across all review platforms.
Jay Banlasan
The AI Systems Guy
A reputation score tracking system automated across all platforms gives you one number that represents your online standing. I build these because watching individual platform ratings is like checking each tire separately when you need to know if the car can drive. The composite score combines ratings, review volume, response rate, and sentiment into a single health metric.
When the score drops, you know immediately. When it climbs, you can trace it back to what worked.
What You Need Before Starting
- Aggregated review data from all platforms (see system 398)
- Python 3.8+ with sqlite3
- Historical review data for baseline comparison
- A reporting mechanism (dashboard, Slack, email)
Step 1: Define the Scoring Formula
def calculate_reputation_score(platform_data):
"""
Composite score from 0-100 based on:
- Average rating (40% weight)
- Review volume trend (20%)
- Response rate (20%)
- Sentiment trend (20%)
"""
rating_score = (platform_data["avg_rating"] / 5.0) * 100
volume_score = min(platform_data["review_velocity"] / platform_data["target_velocity"] * 100, 100)
response_score = platform_data["response_rate"]
sentiment_score = ((platform_data["avg_sentiment"] + 1) / 2) * 100 # Convert -1..1 to 0..100
composite = (
rating_score * 0.4 +
volume_score * 0.2 +
response_score * 0.2 +
sentiment_score * 0.2
)
return round(composite, 1)
Step 2: Gather Platform Metrics
import sqlite3
from datetime import datetime, timedelta
def get_platform_metrics(platform=None, days=30):
conn = sqlite3.connect("reviews_agg.db")
where = "WHERE date > datetime('now', ?)"
params = [f"-{days} days"]
if platform:
where += " AND platform = ?"
params.append(platform)
avg_rating = conn.execute(f"SELECT AVG(rating) FROM reviews {where}", params).fetchone()[0] or 0
total_reviews = conn.execute(f"SELECT COUNT(*) FROM reviews {where}", params).fetchone()[0]
responded = conn.execute(f"SELECT COUNT(*) FROM reviews {where} AND responded = 1", params).fetchone()[0]
prev_total = conn.execute(
f"SELECT COUNT(*) FROM reviews WHERE date BETWEEN datetime('now', ?) AND datetime('now', ?)",
(f"-{days*2} days", f"-{days} days")
).fetchone()[0]
return {
"avg_rating": round(avg_rating, 2),
"review_count": total_reviews,
"review_velocity": total_reviews,
"target_velocity": max(prev_total, 1),
"response_rate": round(responded / total_reviews * 100, 1) if total_reviews else 0,
"avg_sentiment": get_avg_sentiment(days, platform)
}
Step 3: Track Score Over Time
def record_daily_score():
overall = get_platform_metrics()
score = calculate_reputation_score(overall)
conn = sqlite3.connect("reputation.db")
conn.execute("""
INSERT INTO score_history (date, score, avg_rating, review_count, response_rate)
VALUES (date('now'), ?, ?, ?, ?)
""", (score, overall["avg_rating"], overall["review_count"], overall["response_rate"]))
platforms = ["google", "yelp", "facebook"]
for platform in platforms:
metrics = get_platform_metrics(platform=platform)
platform_score = calculate_reputation_score(metrics)
conn.execute("""
INSERT INTO platform_scores (date, platform, score, avg_rating, review_count)
VALUES (date('now'), ?, ?, ?, ?)
""", (platform, platform_score, metrics["avg_rating"], metrics["review_count"]))
conn.commit()
return score
Step 4: Detect Score Changes
def check_score_changes():
conn = sqlite3.connect("reputation.db")
recent = conn.execute(
"SELECT score FROM score_history ORDER BY date DESC LIMIT 2"
).fetchall()
if len(recent) < 2:
return None
current, previous = recent[0][0], recent[1][0]
change = current - previous
if abs(change) >= 3:
direction = "improved" if change > 0 else "dropped"
return {
"current": current,
"previous": previous,
"change": round(change, 1),
"direction": direction,
"alert": abs(change) >= 5
}
return None
Step 5: Generate Score Reports
def generate_reputation_report():
score = record_daily_score()
change = check_score_changes()
report = f"Reputation Score: {score}/100\n"
if change:
report += f"Change: {change['change']:+.1f} ({change['direction']})\n"
platforms = get_all_platform_scores()
for p in platforms:
report += f"\n{p['platform'].title()}: {p['score']}/100 (avg {p['avg_rating']} stars, {p['review_count']} reviews)"
if change and change.get("alert"):
send_alert(report)
return report
What to Build Next
Add competitor reputation tracking. Calculate the same score for 3-5 competitors. Track where you rank relative to them. A reputation score of 72 means nothing in isolation, but "72 vs the market average of 65" tells a story.
Related Reading
- Competitive Intelligence with AI - tracking reputation relative to competitors
- The Measurement Framework That Actually Works - building composite metrics that actually measure something
- How Systems Compound Over Time - reputation scores compound with consistent effort
Want this system built for your business?
Get a free assessment. We will map every system your business needs and show you the ROI.
Get Your Free Assessment