Files
LinkedIn-Analytics-Dashboard/visibility_tracker.py
T
beantownbabeandClaude Sonnet 5 833cfc6388 Add hand-logged Visibility row: Profile Appearances and Profile Views
LinkedIn has no file export for either metric (confirmed - no Download option
exists on the "Who's viewed your profile" / "Profile appearances" pages, unlike
the content analytics file team_exports.py parses), so this is a hand-maintained
log (visibility_tracker.py, same "add an entry, no code change needed" pattern
as conversation_tracker.py) rather than another auto-parsed file.

Shown as its own card above the main dashboard, independent of whether a
person's Aggregate Analytics export exists yet - visibility logging and the
Monday export are two separate data sources that can each arrive on their own
schedule. Seeded with Mckinley's real first week (Oct 20-26: 10 all
appearances +67%, 1 search appearance +0%).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-30 11:28:51 +01:00

43 lines
1.5 KiB
Python

"""Hand-logged Profile Views / Profile Appearances per team member, since LinkedIn
doesn't offer a file export for either (unlike the Aggregate Analytics content file
team_exports.py parses) - both only show live on a person's own profile page, under
"Profile appearances" and "Who's viewed your profile."
Profile Appearances = how often someone's name/headline showed up across LinkedIn
(search results, others' feeds, comments, People You May Know), split into All
appearances and the Search-appearances subset. Profile Views = actual visits to the
profile page. Add an entry here each Monday alongside that person's export - same
"add an entry, no code change needed" pattern as conversation_tracker.py.
"""
# {
# "name": "Mckinley Black",
# "week_start": "2026-10-20",
# "week_end": "2026-10-26",
# "all_appearances": 10,
# "all_appearances_change_pct": 67,
# "search_appearances": 1,
# "search_appearances_change_pct": 0,
# "profile_views": None,
# },
VISIBILITY_LOG = [
{
"name": "Mckinley Black",
"week_start": "2026-10-20",
"week_end": "2026-10-26",
"all_appearances": 10,
"all_appearances_change_pct": 67,
"search_appearances": 1,
"search_appearances_change_pct": 0,
"profile_views": None,
},
]
def latest_for(name):
"""Most recent logged week for a person, by week_end - None if nothing logged yet."""
entries = [e for e in VISIBILITY_LOG if e["name"] == name]
if not entries:
return None
return max(entries, key=lambda e: e["week_end"])