Joins two data streams: (1) Shopify line-item _upsell_* properties for revenue attribution
(live now via ingest_shopify.py), (2) GA4 events for funnel metrics
(impressions, accept rate, dismiss reasons — pending GA4 ingest setup).
Pipeline Status
Theme dataLayer events
Fired by
pdp-product-upsell.js +
pdp-donation-upsell.js on theme 160800145656.
Live since 2026-04-30 17:14 PT
GTM tag config
4 GA4 Event tags forwarding the dataLayer events (GTM-PS43Q3B v37, published by AdSmith 2026-05-01 13:48 PT).
Live since 2026-05-01 13:48 PT
Shopify line-item ingest
ingest_shopify.py extracts 7
_upsell_* customAttributes from each line item into
raw_upsell_attributions.
Live (extended 2026-05-01)
GA4 Data API ingest
ingest_ga4.py + service-account creds at
OneDrive/Apps/GoogleAnalyticsAPI/.env.
TODO — DataOps
Filters
Revenue Attribution
Discount Cost & Net Contribution
Upsells per Day, by Product
Daily accept count
One line per upsold product · click legend to toggle
By Product
| Product |
Orders |
Lines |
Qty |
Revenue |
Disc $ |
By Campaign
| Campaign |
Orders |
Lines |
Revenue |
By Modal Type
| Modal Version |
Orders |
Lines |
Revenue |
Funnel Metrics (GA4 events) PENDING
Modal Funnel
Awaiting GA4 ingest. Once DataOps stands up
ingest_ga4.py, this card will show:
- Impressions (modal_view count)
- Accept rate (accept_success / view)
- Dismiss-by-reason (no / x / cancel / backdrop)
- Drop-off: accept-clicked but no success
Health Alerts
Awaiting GA4 ingest. Will surface:
- view→accept_success ratio drop below floor
- modal_view firing on FOTM PDP itself (self-ref guard)
- accept-no-success ratio > 5% (/cart/add failures)
Schema Reference
Table: raw_upsell_attributions
One row per accepted upsell line item. Source: Shopify GraphQL Orders API,
line_items[].customAttributes with keys prefixed _upsell_*.
Underscore-prefix is Shopify convention for hidden line-item properties — invisible
to customer-facing emails/checkout but exportable via the API.
Source attribute keys (set by ThemeSmith's modal controllers)
_upsell_modal_v · _upsell_source_product_id ·
_upsell_source_variant_id · _upsell_campaign ·
_upsell_source_mode · _upsell_discount_pct ·
_upsell_accepted_at
Built by build_pdp_upsell_dashboard.py · 2026-05-19 07:01:54