Integrations
How TikTok and Instagram auto-tracking work, with platform-specific details.
ViewsBase automatically tracks video performance across TikTok and Instagram.
TikTok — Automatic Tracking
TikTok videos are tracked automatically with no manual intervention required.
What Gets Tracked
Every 6 hours, ViewsBase pulls from the TikTok API:
- Views — total video views
- Likes — total likes
- Comments — total comments
- Shares — total shares
Additionally, the creator's handle and platform user ID are synced from the API response, keeping your data up to date if a creator changes their username.
How It Works
- A video is added to a campaign (either manually via the Posts tab or through the API)
- ViewsBase identifies the video by its TikTok post ID
- Every 6 hours, a background job fetches the latest stats from TikTok's API
- The stats are updated in the Posts tab automatically
Videos from the last 30 days are included in the refresh cycle. Older videos are not actively refreshed but retain their last-known stats.
Automatic Actions at 7 Days
When a TikTok video reaches 7 days old:
-
If it has 1,000+ views and CPM/cap assigned: The video is auto-finalized. View count is locked, earnings are calculated, and it moves to the Finalized status. Ready for payment.
-
If it has fewer than 1,000 views: The video is auto-rejected. It's excluded from the campaign. The rejection reason is set automatically.
-
If it has 1,000+ views but no CPM/cap assigned: The video moves to Pending CPM status. You'll need to assign the CPM tier in the Posts tab before it can finalize.
Post-Finalization Tracking
Even after a video is finalized or paid, ViewsBase continues tracking views daily (not every 6 hours). This is read-only — the finalized view count and earnings don't change — but it lets you see long-term performance trends in the Analytics tab.
Batch Processing
Videos are processed in batches of 10 with a 0.5-second delay between batches to respect API rate limits. If the primary TikTok API fails, ViewsBase automatically falls back to a backup API.
Error Handling
- If the TikTok API returns an error for a specific video (e.g., video deleted, private), that video is skipped and the rest continue processing.
- API failures are logged but don't affect other videos in the batch.
- If a video can't be found on TikTok repeatedly, it stays at its last-known view count.
Instagram — Automatic Tracking
Instagram videos are also tracked automatically, with some differences from TikTok.
What Gets Tracked
ViewsBase pulls from the Instagram API:
- Views — total video views (play count)
- Likes — total likes
- Comments — total comments
How It Works
- A video is added to a campaign (via Discord bot or the Posts tab)
- ViewsBase identifies the video by its Instagram shortcode (e.g.,
ABC123xyz) - Every 6 hours, a background job fetches the latest stats from the Instagram API
- The stats are updated in the Posts tab automatically
Instagram videos are processed sequentially with a 3-second delay between requests to respect API rate limits (compared to TikTok's batch processing).
Note: Carousel posts (GraphSidecar) that report 0 views are automatically skipped — this is normal Instagram API behavior for multi-image posts.
Automatic Actions at 7 Days
Instagram videos follow the same 7-day rules as TikTok:
- If it has 1,000+ views and CPM/cap assigned: Auto-finalized
- If it has fewer than 1,000 views: Auto-rejected
- If it has 1,000+ views but no CPM/cap assigned: Moves to Pending CPM
Platform Comparison
| Feature | TikTok | |
|---|---|---|
| View tracking | Automatic every 6 hours | Automatic every 6 hours |
| Engagement stats | Views, likes, comments, shares | Views, likes, comments |
| Auto-finalize at 7 days | Yes (if CPM assigned + 1K+ views) | Yes (if CPM assigned + 1K+ views) |
| Auto-reject at 7 days | Yes (< 1,000 views) | Yes (< 1,000 views) |
| Post-finalization tracking | Yes (daily) | Yes (daily) |
| Processing method | Batches of 10 (0.5s between batches) | Sequential (3s between requests) |
| Fallback API | Yes (backup TikTok API) | No |
Adding Videos
Videos can be added to campaigns in two ways:
Via the Dashboard
- Go to the Posts tab
- Videos appear when they're added through the admin panel or API
- Provide the video URL or post ID — stats start tracking automatically for both platforms
Platform Requirements
TikTok videos need:
- A valid TikTok post ID or URL
- The creator must already be added to the campaign
- The video must be publicly accessible (not private or deleted)
Instagram videos need:
- A valid Instagram post ID or URL (the shortcode is extracted automatically)
- The creator must already be added to the campaign
- The video must be publicly accessible