Search documentation...

K
ChangelogBook a demoSign up

Ads Schema

Campaign Intelligence is available as an add-on on Business tier plans.

Overview

Campaign Intelligence for ads leverages four types of models:

  1. Users are the parent model.
  2. Sessions are a type of Event and connect a user to an ad. They necessarily have a timestamp and typically include utm parameters.
  3. Ads are a type of Asset, and minimally include campaign and platform information.
  4. Ad stats is a model that indicates engagement with an ad, such as clicks, impressions, and spend. It should fit the format of this dbt model.

The relationships between these models depend on whether your ad model has information about the ad itself, such as an ad_name or ad_group_id alongside the ad campaign information or just campaign information.

Below are entity relationship diagrams (ERDs) that show expected columns and relationships in both situations, including necessary primary (PK) and foreign keys (FK). We note differences between the schemas.

Schema with only campaign data for ads

Ads schema with campaign data

The ERD above includes the important features:

  • Sessions connect to Ads with a campaign identifier based on what's available in the session, in this case through a mapping from utm_campaign to campaign_name.
  • Ads also connect to Ad stats through a campaign identifier, in this case the campaign_id.
  • Hightouch generates a primary key in the Ad stats model that combines the date_day and campaign_id columns.

Schema with ad, ad group, and campaign data

Ads schema with additional ads data

Two notable differences in the schema are evident when there is additional ad and ad group information.

  • Sessions now connect to Ads through an identifier at the level of an individual ad, in this case with a mapping from utm_content to ad_name.
  • Ads also now connect to Ad stats through an individual ad level identifier, here the ad_id.
  • Both Ads and Ad stats have additional columns for individual ad level information.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Last updated: Dec 3, 2024

On this page

OverviewSchema with only campaign data for adsSchema with ad, ad group, and campaign data

Was this page helpful?