Daycare Photo Download
Daycare Photo Download Beach Street Labs · Internal · Oct 5, 2026

Executive summary · Section 12

Exists today (site README):

  • dpd_utm cookie captures UTMs and click ids.
  • /api/checkout stamps attr_* on Stripe.
  • GA4 fires checkout_start and cws_click; /thanks sends Purchase to the pixels.
  • GTM only for tags not in code.
  • The Neon runs table records platform; upsertAppleCustomer stores no channel.
  • Format: https://apps.apple.com/app/apple-store/id6808699477?pt=<PROVIDER_TOKEN>&ct=<campaign>&mt=8
    • pt is your provider token (App Store Connect → App Analytics → Sources → Campaigns → “Generate campaign link”).
    • Keep ct short; Apple limits its length.
  • Naming: ct = <source>_<campaign>, mirroring UTMs.
    • Paid and owned: google_mobile, pinterest_promoted, fb_retarget
    • Organic and bios: ig_bio, tiktok_bio, x_launch, reddit_answer
    • Offline and partners: flyer_parents, director_email, creator_<name>
  • On the site: rewrite every App Store href client-side so ct = the visitor’s dpd_utm source and campaign (fallback site_direct).
    • Do this in components/Tracking.tsx, next to the existing cws_click handler.
    • Then Google, Pinterest and Meta visitors who tap the badge arrive in App Analytics under their channel.
  • Caveats:
    • App Analytics only reports users who opted in to share analytics with developers, so treat the numbers as directional and undercounted.
    • The Smart App Banner doesn’t carry a campaign token, so banner installs won’t map to a channel. Keep the banner (conversion matters more than attribution).
  • What you get by ct: impressions, product page views, installs and, I believe, proceeds/sales. Confirm in your App Analytics UI which of these show per campaign.

12b. App Store click events

PlatformEventFire onNotes
GA4appstore_click (key event)Any link to apps.apple.comParams: placement (hero / pricing / guide_step / footer / banner_cta), page_path, utm_source from cookie. Mirror the cws_click code path.
Google AdsImport appstore_click—Primary conversion for the mobile campaign until in-app purchases can be attributed. purchase stays primary for desktop.
Meta PixeltrackCustom('AppStoreClick') (or the standard Lead if you prefer optimization stability)Same clickUse it for retargeting optimization. Aggregated Event Measurement priority: Purchase > AppStoreClick > InitiateCheckout.
Pinterest taglead or a custom eventSame clickLets the promoted campaign optimize.
Reddit pixelLeadSame clickFor the future, if paid Reddit ever restarts.
TikTok pixelOnly if Spark Ads start (via GTM)——

12c. iOS purchase attribution (closing the CAC gap)

  • Per channel, weekly:
    • CAC_ios ≈ channel spend × (share of that channel’s App Store clicks) ÷ App Store licenses attributed to that ct in App Analytics.
    • CAC_web = spend ÷ Stripe attr_utm_source.
    • Report both, plus blended.
  • Apple Ads reports its own installs natively. Count licenses from App Store Connect subscription reports for the Apple Ads campaign window.
  • Optional, privacy-preserving: when upsertAppleCustomer runs, store the App Store campaign (not the user) if your server-side receipt or notification data exposes it. Unverified whether it does; check App Store Server API / notification fields. Don’t add any SDK.
  • Neon/admin: split runs by platform (ios vs. chrome). Preview → paid by platform is the core iOS-first funnel metric.

12d. UTM convention (unchanged, plus ct)

ParamValues
utm_sourcegoogle · bing · apple_ads · facebook · instagram · pinterest · reddit · tiktok · x · email · flyer · director
utm_mediumcpc · social · pin · group · email · print · referral
utm_campaignprocare_mobile, procare_desktop, leaving, retarget, promoted, launch, holiday, bio, <post-slug>
utm_contentangle and creative, e.g. a_loss_phone, c_ritual_calendar, b_share_airdrop, d_tonight_laptop
App Store ct<source>_<campaign>, as above

Legacy links (utm_source=social&utm_medium=bio, utm_medium=pin) stay live; map them in the CAC script.

12e. Setup checklist

  • GA4: add appstore_click; confirm checkout_start, cws_click and purchase are key events; fix the Data API analytics.readonly scope.
  • App Store Connect: generate campaign links for every ct above; rewrite site App Store hrefs with a dynamic ct.
  • Google Ads: import appstore_click; device-split campaigns; auto-tagging on.
  • Meta: AppStoreClick custom event and custom conversion; AEM priority; Conversions API only if spend exceeds ~$5/day.
  • Pinterest and Reddit: lead event on App Store click; test with one tap each.
  • One end-to-end test on an iPhone: ad URL → landing page → badge tap (check GA4 and pixels fire, and that the App Store URL carries ct) → in-app purchase (sandbox/TestFlight) → apple_activated row in Neon.
  • One desktop test purchase (then refund) to confirm Stripe attr_utm_source and the Purchase pixels.
  • Weekly (Mondays, 20 min): npm run cac -- --live --spend … (web); App Analytics by campaign plus subscription report (iOS); Apple Ads dashboard; Log the results under a dated “Results” heading in paid-channels-strategy.md