Data Contract

Governed weekly inputs for marketing effectiveness modeling.

The lab is built around explicit schemas rather than loose spreadsheets. Weekly marketing data, platform exports, source diagnostics, and final MMM-ready tables are validated before dashboarding or modeling.

Primary Grain Weekly

Monday week-start dates with continuous, unique weekly rows.

Outcome Source Ecommerce

Shopify or equivalent order export reconciles revenue and orders.

Validation In memory

Current prototype parses uploaded CSVs without persisting private files.

Weekly MMM Schema

Column Description
week_startMonday date for the reporting week.
revenue_gbpWeekly ecommerce revenue in GBP.
ordersWeekly ecommerce orders.
new_customersWeekly first-time customers.
average_order_value_gbpWeekly average order value in GBP.
paid_search_spend_gbpWeekly paid search media spend in GBP.
paid_social_spend_gbpWeekly paid social media spend in GBP.
display_spend_gbpWeekly display media spend in GBP.
affiliates_spend_gbpWeekly affiliate channel spend in GBP.
email_spend_gbpWeekly email or CRM campaign spend in GBP.
influencer_spend_gbpWeekly influencer marketing spend in GBP.
organic_search_sessionsWeekly organic search sessions.
promotion_depth_pctAverage weekly promotional discount depth.
promotion_flagWhether a major promotion ran that week.
holiday_flagWhether the week contains a major UK retail holiday period.
season_spring_summerSpring/summer seasonal collection flag.
season_autumn_winterAutumn/winter seasonal collection flag.
consumer_confidence_indexConsumer confidence control placeholder.
inflation_rate_pctInflation control placeholder.

Connector Templates

GA4

Traffic, users, purchases, purchase revenue, and organic source/medium sessions.

Google Ads

Campaign, campaign type, cost, impressions, clicks, conversions, and conversion value.

Meta Ads

Campaign, objective, spend, reach, impressions, link clicks, purchases, and purchase value.

Shopify or Ecommerce

Gross sales, discounts, returns, net sales, orders, new-customer orders, and AOV.

CRM and Lifecycle

Sends, delivered, opens, clicks, orders, revenue, and platform or incentive cost.

Display

Campaign, platform, spend, impressions, clicks, and view-through or click-through conversions.

Affiliates

Partner, attributed orders, revenue, commission, and network fees.

Influencer

Creator fees, usage rights, paid boosting, impressions, engagements, tracked orders, and revenue.

External Controls

Consumer confidence and inflation controls aligned to the weekly modeling grain.

Assembly Mapping

Source Output Fields
Shopify or ecommerce revenue_gbp, orders, new_customers, average_order_value_gbp, promotion fields, season defaults, holiday defaults
Google Ads paid_search_spend_gbp
Meta Ads paid_social_spend_gbp
CRM and lifecycle email_spend_gbp
GA4 organic_search_sessions from organic source/medium rows
Display ads display_spend_gbp
Affiliates affiliates_spend_gbp from commission plus network fees
Influencer influencer_spend_gbp from creator fees, usage rights, and paid boosting
External controls consumer_confidence_index, inflation_rate_pct

Validation Rules

Week Starts

Dates must be Mondays, unique, and continuous.

Required Fields

All required schema or connector columns must be present.

Numeric Values

Numeric columns must parse cleanly and non-negative fields cannot be below zero.

Flags

Promotion, holiday, and season flags must be binary.

Source Diagnostics

The connector workflow reports weekly history, schema status, outcome quality, media channel coverage, organic availability, zero-default channels, and connector coverage before the dataset is used for modeling.