Tiktok Ads model

Ad group performance daily

Daily performance per ad group, labelled with the optimisation goal and event that define what "conversions" means for it. This is the level to read cost per conversion at: within one ad group the conversions are a single event type.

Grain
date_day x account_id x ad_group_id
Built from
  1. 5
    Raw tables
  2. 5
    Staging
  3. 2
    Core
  4. 1
    Analytics
Reads from Tiktok Ads
adad_daily_reportad_groupadvertisercampaign
Ships as
Weld and dbt SQL, open source on GitHub
core.tiktok_ads.ad_group_performance_daily
1-- core.tiktok_ads.ad_group_performance_daily
2-- Daily performance per ad group, labelled with the optimisation goal and event
3-- that define what "conversions" means for it. This is the level to read cost
4-- per conversion at: within one ad group the conversions are a single event type.
5--
6-- Grain: date_day x account_id x ad_group_id. Currency: the advertiser's.
7-- Depends on: core.tiktok_ads.ad_performance_daily, staging.tiktok_ads.ad_group
8--
9-- Reach is left out: it does not add up across ads.
10-- budget is the current setting, not the budget on that day; budget_mode says
11-- whether it is daily or lifetime.
12
13WITH group_daily AS (
14    SELECT
15        date_day,
16        account_id,
17        account_name,
18        currency,
19        campaign_id,
20        campaign_name,
21        ad_group_id,
22        SUM(spend)              AS spend,
23        SUM(impressions)        AS impressions,
24        SUM(clicks)             AS clicks,
25        SUM(conversions)        AS conversions,
26        SUM(conversion_value)   AS conversion_value,
27        SUM(complete_payments)  AS complete_payments,
28        SUM(app_purchases)      AS app_purchases,
29        SUM(app_purchase_value) AS app_purchase_value,
30        SUM(video_views)        AS video_views,
31        COUNT(DISTINCT ad_id)   AS active_ads
32    FROM {{core.tiktok_ads.ad_performance_daily}}
33    GROUP BY 1, 2, 3, 4, 5, 6, 7
34)
35
36SELECT
37    d.date_day,
38    d.account_id,
39    d.account_name,
40    d.currency,

This model and the 7 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().

Notes

How it counts. And where it stops.

Reach is left out: it does not add up across ads. budget is the current setting, not the budget on that day; budget_mode says whether it is daily or lifetime.

Raw tables it reads

  • raw.tiktok_ads.ad
  • raw.tiktok_ads.ad_daily_report
  • raw.tiktok_ads.ad_group
  • raw.tiktok_ads.advertiser
  • raw.tiktok_ads.campaign

Put Tiktok Ads in front
of your agents.

Connect Tiktok Ads, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.