RoadwayDocs

Ad spend and MMP tables

Ad spend tables drive acquisition cost by campaign. MMP tables carry app installs and in-app events.

Ad spend

Roadway uses ad spend with page views to calculate acquisition cost by campaign.

Supported platforms and connectors

Synced in the app

When you connect an ad platform in Roadway (Admin › Integrations), Roadway syncs its spend for you. This works for Google Ads, Meta Ads, LinkedIn Ads, TikTok Ads, Microsoft Ads (shown as Bing Ads in Roadway), Snapchat Ads, Reddit Ads, X Ads and ChatGPT Ads.

Loaded by your own ETL into your warehouse

Platform Connectors Roadway models
Google Ads Airbyte, Fivetran, Stitch, Google BigQuery Data Transfer Service
Meta Ads Airbyte only
LinkedIn Ads Airbyte. Fivetran lacks campaign groups, so treat LinkedIn as Airbyte only.
TikTok Ads Airbyte only
Bing Ads Airbyte only
Snapchat Ads Airbyte only
Reddit Ads Polytomic only
X Ads Polytomic only
ChatGPT Ads Polytomic only

There is no Fivetran Meta or TikTok, and no Pinterest. Custom ad spend is a custom project; confirm with Roadway.

Tables by connector

Connector Platform Tables Docs
Airbyte Google Ads google_ads_campaign, plus google_ads_campaign_performance_report (where segments_date and metrics_cost_micros live) Airbyte Google Ads
Airbyte Meta Ads meta_ads_campaigns, meta_ads_ads_insights Airbyte Facebook Marketing
Airbyte LinkedIn Ads linkedin_ads_campaign_groups (required), linkedin_ads_campaigns, linkedin_ads_ad_campaign_analytics Airbyte LinkedIn Ads
Stitch Google Ads google_ads_campaigns Stitch Google Ads
Polytomic Reddit Ads campaign, report_campaign_id (fields id, name, campaign_id, spend, impressions, clicks, date) Polytomic Reddit Ads
Fivetran Google Ads campaign_stats, campaign_history Fivetran Google Ads

Tables Roadway builds

Roadway builds these tables from your ad-platform connections. You don't create them. Their constraints:

  • dim__marketing_campaigns: unique on (campaign_id, platform_name). campaign_id, campaign_name, platform_name and traffic_source are not null.
  • dim__marketing_ad_groups and dim__marketing_ads: identified by the ad group or ad ID plus platform_name. There is no unique rule on campaign_id.
  • fact__marketing_campaign_performance: one row per (date_day, campaign_id, platform_name, ad_group_id, ad_id, publisher_platform, placement, audience_name). date_day, campaign_id, spend, platform_name and traffic_source are not null. spend is zero or more, in currency units. ad_group_id and ad_id can be null.
  • Google keywords: dim__marketing_keywords (unique keyword_key) and fact__marketing_keyword_performance (unique on date_day, campaign_id, keyword_key).

For LinkedIn, campaign_id is the campaign group ID. The LinkedIn campaign becomes ad_group_id, and the creative becomes ad_id.

Google Ads reports cost in micros (metrics_cost_micros). Roadway divides by 1,000,000 for spend.

How campaigns match visits

Roadway can compare any identifier in the landing page URL to your ad platform data, including UTM parameters, campaign or ad IDs, and platform click IDs such as gclid. When you match on utm_campaign, Roadway compares:

  1. campaign_name = utm_campaign, falling back to
  2. campaign_id = utm_campaign, but only when the channel your attribution rules assign to the visit equals the spend platform_name (for example Google Ads).

Values that don't match keep the raw utm_campaign, with no spend. Set utm_campaign to the campaign ID (for LinkedIn, the top-level campaign, formerly the campaign group) or the exact campaign name. See How campaign matching works.

Mobile measurement partners

An MMP, such as AppsFlyer, Adjust, Branch, Singular or Kochava, attributes app installs and in-app events to the campaign that drove them.

Roadway reads your MMP's user-level exports from your warehouse and uses the pre-signup touchpoints as attribution touchpoints, alongside web page views.

Roadway doesn't connect to MMPs directly. Use your MMP's scheduled user-level (raw data) export to BigQuery, Snowflake, S3, or another store, and land the tables below in your warehouse. Per-vendor setup is in Mobile attribution.

Talk to Roadway before you set up the export. Roadway confirms the exact tables with you.

User attributions (touchpoints)

One row per attributed touchpoint (install, re-engagement, or re-attribution) per user.

Column Type Description Required
custom_user_id varchar Your user identifier as set in the MMP SDK. Must match user_id in the Users table Yes
touchpoint_timestamp timestamp UTC timestamp of the click, impression, or install Yes
platform varchar App platform, for example ios or android Yes
partner varchar Ad network or media source the MMP attributed the touchpoint to Yes
campaign_name varchar Campaign name reported by the partner Yes
campaign_id varchar Campaign identifier reported by the partner No
creative_name varchar Creative or ad name No
creative_id varchar Creative or ad identifier No
country varchar Country of the device at the time of the touchpoint No
utm_source, utm_medium, utm_campaign, utm_content, utm_term varchar UTM parameters, when the MMP passes them through (deep links, web-to-app) No

Key points

  1. custom_user_id is the identifier you attach to a user in your MMP's SDK after they sign up or log in. It must be the same value as user_id in your Users table. The name differs by vendor. See the identifier by vendor.
  2. Roadway joins touchpoints to users on custom_user_id only. Rows where it is empty or unmatched are dropped. Device IDs, IDFA, GAID, and the MMP's own anonymous IDs aren't used.
  3. The export must be at user level. Aggregated or cohort reports can't be joined to users.
  4. A user can have several rows. Roadway only uses touchpoints that happened before the user's sign-up.
  5. During onboarding, Roadway maps the partner names in your export to a traffic source and channel. Send Roadway the list of partners in your export.
  6. Campaign names are looked up by campaign_id using the same campaign mapping as web traffic, because MMP campaign names are often truncated or renamed. Populate campaign_id whenever the partner provides it.

App events (optional)

One row per in-app event per user. You only need this for in-app funnel metrics, such as app opens to purchases, not for attribution.

Column Type Description Required
user_id varchar Your user identifier. Must match user_id in Users Yes
event_name varchar Event name as sent to the MMP SDK, including the install event Yes
event_timestamp timestamp UTC timestamp of the event Yes
platform varchar App platform Yes
revenue decimal, nullable Event revenue in your reporting currency. Null for other events Yes (column), may be null
arguments json or varchar, nullable Event properties as sent to the MMP SDK Yes (column), may be null

Some MMPs truncate long event names in exports. Check that exported names match what you expect, and tell Roadway the name of your install event and the conversion events to track.

DDL

CREATE TABLE mmp_user_attributions (
  custom_user_id       VARCHAR   NOT NULL,
  touchpoint_timestamp TIMESTAMP NOT NULL,
  platform             VARCHAR   NOT NULL,
  partner              VARCHAR   NOT NULL,
  campaign_name        VARCHAR   NOT NULL,
  campaign_id          VARCHAR,
  creative_name        VARCHAR,
  creative_id          VARCHAR,
  country              VARCHAR,
  utm_source           VARCHAR,
  utm_medium           VARCHAR,
  utm_campaign         VARCHAR,
  utm_content          VARCHAR,
  utm_term             VARCHAR
);

Roadway names the final table during onboarding. The name above is illustrative.

How Roadway uses MMP data

Touchpoints before sign-up are used as attribution touchpoints. Roadway assigns the traffic source and channel like this:

  1. If the touchpoint has UTM parameters, your UTM attribution rules apply.
  2. Otherwise, the partner-to-channel mapping applies.
  3. If the partner isn't in the mapping, the traffic source is Performance Marketing and the channel is the raw partner name, or Mobile - Unmapped when the partner is empty.

The campaign is the campaign name mapped from campaign_id, falling back to the exported campaign_name.

If a user also has a pre-signup web page view, Roadway uses the web visit and ignores the user's MMP touchpoints.

Validation

  • custom_user_id is never null. Rows without it are dropped.
  • The share of matched touchpoints is close to the share of users who signed up in the app.
  • touchpoint_timestamp and platform are never null.
  • Partner and campaign names are stable. Renames appear as new values.