When a team tests two short videos, a simple spreadsheet often contains a views column and a note saying one post received paid reach. The tempting calculation is organic_views = total_views - ordered_views. That number looks precise, but the order quantity is not a verified count of distinct people who watched the video inside the same reporting window.

A safer model keeps platform observations and interventions in separate records. This is useful for TikTok, but the pattern also applies to promoted posts, email campaigns and experiments where outside activity changes exposure.

Two small files, two different claims

videos.csv contains observations copied from the platform at the same post age. The values below are fictional test data:

video_id,age_hours,views,duration_s,avg_watch_s clip_a,48,184,30,8.4 clip_b,48,320,30,10.2 

events.csv records actions taken outside the platform analytics. These entries come from your own operations log:

video_id,event_at_hour,event_type clip_b,12,paid_view_order 

An event says an order was placed; it does not claim that every ordered view arrived, that all views were unique, or that TikTok's analytics separated them from other traffic. A Buff View TikTok service description is one concrete example of the kind of external view order this event should capture. The link is context for the data model, not a measurement source.

Reject the comparison before calculating a winner

The script below joins the two files, checks the sampling window and marks each row. It deliberately does not manufacture an “organic view” estimate.

import csv from pathlib import Path def read_csv(name): with Path(name).open(newline="", encoding="utf-8") as file: return list(csv.DictReader(file)) videos = read_csv("videos.csv") events = read_csv("events.csv") if not videos: raise ValueError("No video snapshots") ids = [row["video_id"] for row in videos] if len(ids) != len(set(ids)): raise ValueError("Duplicate video_id in snapshots") if set(event["video_id"] for event in events) - set(ids): raise ValueError("An event references an unknown video_id") ages = {int(row["age_hours"]) for row in videos} if len(ages) != 1: raise ValueError("Snapshots must be taken at the same post age") for row in videos: age = int(row["age_hours"]) duration = float(row["duration_s"]) watch = float(row["avg_watch_s"]) views = int(row["views"]) if duration <= 0 or watch < 0 or views < 0: raise ValueError(f"Invalid values for {row['video_id']}") interventions = [ event["event_type"] for event in events if event["video_id"] == row["video_id"] and int(event["event_at_hour"]) <= age ] cohort = "intervened" if interventions else "unassisted" print( f"{row['video_id']}: {views} views, " f"watch/duration={watch / duration:.1%}, cohort={cohort}" ) 

Running it on the sample files prints:

clip_a: 184 views, watch/duration=28.0%, cohort=unassisted clip_b: 320 views, watch/duration=34.0%, cohort=intervened 

The output does not say that clip_b performed better because its view count is higher. The posts belong to different cohorts. Average watch time divided by duration is only a descriptive ratio, not a completion rate; repeat viewing can push it above 100%.

What this model can and cannot tell you

You can still inspect the opening scene, retention curve and viewer feedback for each post. You can also compare videos with similar topics, durations and observation windows within the same cohort. Even then, an observational comparison is not a controlled experiment.

If an intervention starts after your chosen snapshot, the script leaves that snapshot in the unassisted cohort. If it starts earlier, the post is marked as intervened. In a real system, store timestamps rather than whole hours and record the event source, order ID and delivery status. Keep the original platform numbers unchanged so another person can reproduce the analysis.

The key design choice is simple: an action log describes what you did; analytics describes what the platform reported. Joining them is useful. Treating one as a substitute for the other is not.

AI disclosure: This article and sample code were drafted by an AI assistant at the account owner's request. The code and shown output were tested before publication.