Repository navigation
feat(checkout): credit a sale to the Mac app screen that sent the buyer - #127
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
?ref=app-…(app-support,app-about,app-settings,app-activation,app-gate-<feature>), and none of it survived.resolveAttributionnow 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.mdsays 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_sourceon 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=appandref=APP-SUPPORTdo not)npm run typecheckvendor/bin/pest tests/Feature/Landing/PurchaseAttributionTest.php tests/Feature/Contracts: 15 passedvendor/bin/pest: 1906 passed, 263 skipped. Two failures inIntegrationsDataTestcome from the local vendor missingopis/json-schemaand are unrelated