Skip to content

feat(checkout): credit a sale to the Mac app screen that sent the buyer - #127

Merged
datlechin merged 1 commit into
mainfrom
feat/app-link-attribution
Oct 26, 2026
Merged

datlechin merged 1 commit into
mainfrom
feat/app-link-attribution

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Purchase attribution is first touch for ninety days. A buyer who first reached the site through a search, then clicked Compare & Sync's gate in the Mac app and bought, was credited to the search. Every Mac app link carries ?ref=app-… (app-support, app-about, app-settings, app-activation, app-gate-<feature>), and none of it survived.
  • resolveAttribution now lets a visit whose source matches ^app-[a-z0-9-]+$ replace the stored record. The reader was acquired when they installed the app; the screen they clicked from is what led to the sale. Any other tagged visit still leaves the first touch alone.
  • docs/architecture.md says so, and says what the backend now does with the record.

Pairs with TableProApp/license#116, which passes the attribution to Polar as order metadata, so utm_source on the order names the app screen. Either can deploy first.

Test plan

  • npm run test:js: 282 passed, two new cases (an app link replaces the first touch; ref=getapps.cafe, ref=app and ref=APP-SUPPORT do not)
  • npm run typecheck
  • vendor/bin/pest tests/Feature/Landing/PurchaseAttributionTest.php tests/Feature/Contracts: 15 passed
  • Full vendor/bin/pest: 1906 passed, 263 skipped. Two failures in IntegrationsDataTest come from the local vendor missing opis/json-schema and are unrelated

Attribution is first touch for ninety days, so a buyer who first found the
site through a search and later clicked a paid feature's gate in the Mac app
was credited to the search. A link from the app (?ref=app-...) now replaces the
stored record: that reader was acquired when they installed the app, and the
screen they clicked from is what brought them to buy.
@datlechin
datlechin merged commit 795ace5 into main Oct 26, 2026
4 checks passed
@datlechin
datlechin deleted the feat/app-link-attribution branch October 26, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant