Inside our data: how Optiq Studio Enterprise stores a campaign
Godswill Iyke Dave4 min read

Automated marketing is only as good as what it remembers. Optiq Studio Enterprise keeps one connected record of every company, every video, every post, every ad and every result, so that any number can be traced back to the film and the decision behind it.
The records, and why each exists
| Record | What it holds | Why |
|---|---|---|
| Company | Name, industry, country, website, settings | Everything belongs to one company. Nothing crosses from one company to another. |
| Member | Each person on your side, with a role: owner, admin, billing or viewer | Who can see what, and who can approve, pay or only watch. |
| Team member | Each person on ours, with a role (director, admin, finance or manager) and the companies they are assigned to | Our team sees only the companies it works on. |
| Connection | The grant a platform gave: which account it acts as, the permissions, its status, and its refresh token, sealed | One grant per channel or account, revocable at any time. |
| Account | Each YouTube channel, Facebook Page, Instagram account and TikTok account | Where we post, and whose numbers we collect. |
| Video | Title, kind, shape, length, resolution, language, brand, product, tagline, and the files (MP4 and the streaming ladder) | The film itself, from our engine, our team or your footage. |
| Story | What a film was made from: the brief, the request, the scenes and the voiceover | Why the film is the way it is. |
| Index | What is actually in the film, read by watching it, and two embeddings | What it is, in a form we can compare and search. |
| Cycle | Objective, brief, dates, goals, the number of videos promised, the price and whether it renews | The plan, and the result it promised. |
| Deliverable | Each video a cycle promised, its state and due date | Progress you can see. |
| Post | One film on one account: its words, privacy, schedule, status, link, approvals and attempts | Each time a film goes out. |
| Post numbers | Hourly snapshots and daily figures: views, engaged views, watch time, view duration, share watched, likes, comments, shares, subscribers | How each post performed over time, not just today. |
| Audience | Groups by age, gender and country, with their share of views, for a window of time | Who watched, without anyone's identity. |
| Ad | One promotion: platform, goal, budget, dates, countries, languages, placements, words, status, review result, estimate | Every paid push, and what it was meant to buy. |
| Ad numbers | Daily impressions, views, clicks, engagements, cost and conversions | What each one bought. |
| Payment request | What is owed for a cycle, when it is due, and how it was paid | Money, clearly. |
| Job | Work waiting to be done: a post, a sync, an index | The queue the automation runs on. |
| Audit | Every action: who did it, to what, and when | Accountability, always. |
One film, followed through
A film is made for a cycle. Its story is captured from our engine; an hour or so later it is watched and indexed. It is approved and posted to three accounts, which makes three posts. Each post gathers hourly counts, then daily analytics and its audience. Two of the posts are promoted, which makes two ads with their own daily numbers. Visitors arrive from those posts and ads and some of them sign up and pay. Every one of those rows points back to the same film, so a single question, what did this video earn?, has an exact answer.
What it is built on
- Postgres, one database for the whole platform, every company's rows carrying its own company id.
- pgvector for the embeddings: 1,536 numbers per film, stored at half precision and indexed for similarity search, so films like this one is a fast query.
- A job queue inside the database. Workers claim work with row locks that skip what another worker holds, so nothing is done twice and nothing is lost.
- Numbers kept by hour and by day, never overwritten with a running total, so any trend can be redrawn.
- Times in UTC, shown in your own time zone.
What we never keep
- Viewers' identities, commenters' names, or anything sensitive a platform could infer about a person.
- Your passwords. Platforms are reached through their own sign-in; we hold only revocable grants, sealed.
- Platform data past the time a platform allows: YouTube's statistics, for example, are kept only while access is re-confirmed every 30 days.
Why it is shaped this way
Because the goal is a model that, given a brand and a product, proposes the video and the targeting most likely to sell. That needs every film described the same way, every result joined to it, and every company's data kept apart. The platforms' own numbers may only ever be used for the company they belong to, and they are. How every video is indexed.


