0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

🐛 Fixed member signup source attributed to Stripe (#17606)

no issue

When a user fails to pay the first time, and returns to the site, the
next payment will be attributed to Stripe instead of the original
referrer. This change always ignores the Stripe checkout as referrer in
the URL history.
This commit is contained in:
Simon Backx 2023-08-07 11:38:46 +02:00 committed by GitHub
parent f953fedd8f
commit c04d8532ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,12 @@ class ReferrerTranslator {
for (const item of history) {
const referrerUrl = this.getUrlFromStr(item.referrerUrl);
if (referrerUrl?.hostname === 'checkout.stripe.com') {
// Ignore stripe, because second try payments should not be attributed to Stripe
continue;
}
const referrerSource = item.referrerSource;
const referrerMedium = item.referrerMedium;