Reddit Ads model
Campaign performance daily
Daily campaign performance with the rates Ads Manager shows: CTR, CPC, CPM, cost per purchase and ROAS.
- Grain
- date_day x account_id x campaign_id
- Built from
- 5Raw tables
- 5Staging
- 2Core
- 1Analytics
- Reads from Reddit Ads
- adad_accountad_groupad_performancecampaign
- Ships as
- Weld and dbt SQL, open source on GitHub
core.reddit_ads.campaign_performance_daily
1-- core.reddit_ads.campaign_performance_daily
2-- Daily campaign performance with the rates Ads Manager shows: CTR, CPC, CPM,
3-- cost per purchase and ROAS.
4--
5-- Grain: date_day x account_id x campaign_id. Currency: the ad account's.
6-- Depends on: core.reddit_ads.ad_performance_daily
7--
8-- Rates are ratios of sums at this grain. To report a week or a month, re-sum the
9-- base columns and divide again; averaging the daily rates weights a quiet day the
10-- same as a busy one.
11
12SELECT
13 date_day,
14 account_id,
15 account_name,
16 currency,
17 campaign_id,
18 campaign_name,
19 campaign_objective,
20
21 SUM(spend) AS spend,
22 SUM(impressions) AS impressions,
23 SUM(clicks) AS clicks,
24 SUM(conversions) AS conversions,
25 SUM(conversion_value) AS conversion_value,
26 COUNT(DISTINCT ad_id) AS active_ads,
27
28 SAFE_DIVIDE(SUM(clicks), SUM(impressions)) AS ctr,
29 SAFE_DIVIDE(SUM(spend), SUM(clicks)) AS cpc,
30 SAFE_DIVIDE(SUM(spend), SUM(impressions)) * 1000 AS cpm,
31 SAFE_DIVIDE(SUM(spend), SUM(conversions)) AS cost_per_conversion,
32 SAFE_DIVIDE(SUM(conversion_value), SUM(spend)) AS roas
33FROM {{core.reddit_ads.ad_performance_daily}}
34GROUP BY 1, 2, 3, 4, 5, 6, 7This 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.
Rates are ratios of sums at this grain. To report a week or a month, re-sum the base columns and divide again; averaging the daily rates weights a quiet day the same as a busy one.
Raw tables it reads
- raw.reddit_ads.ad
- raw.reddit_ads.ad_account
- raw.reddit_ads.ad_group
- raw.reddit_ads.ad_performance
- raw.reddit_ads.campaign
More Reddit Ads models
Put Reddit Ads in front
of your agents.
Connect Reddit Ads, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.