support-frontend icon indicating copy to clipboard operation
support-frontend copied to clipboard

create AB test Logic on one time Contribution checkout for Soft Opt-In

Open maloky opened this issue 7 months ago â€ĸ 3 comments

What are you doing in this PR?

:warning: This is only the frontend part of the Trello ticket.

Create a new ab test participation to track soft opt-in (SOI) consent on the on time contribution checkout. Refactor previous implementation of similarProductsConsent to make it reusable.

Refactor main points:

  • Rename component from SimilarProductConsent -> SoftOptInCheckoutConsent
  • use a hidden input element to track consent value when displayed
  • remove unneeded prop that evaluates component visibility since the input will provide us that value
  • move getConsentValue to own module, and use hidden input value as flag.

Trello Card

Why are you doing this?

We are rolling out soft in consent to one time contribution checkout page.

How to test

Locally

SimilarProductsConsent OneTimeContributionConsent
Control Control
VariantA VariantA
VariantB VariantB

Similar Products

  1. Open the browser dev tools in the network tab and filter for create.
  2. On the payload tab for the request check the sent object.

Screenshot 2025-05-08 at 12 59 38

One Time Contribution

  1. Open the browser dev tools in the network tab and filter for create-payment.
  2. On the payload tab for the request check the sent object.

Screenshot 2025-05-08 at 16 42 57

How can we measure success?

Have we considered potential risks?

Accessibility test checklist

Screenshots

Control Variant A Variant B
support thegulocal com_uk_one-time-checkout support thegulocal com_uk_one-time-checkout (1) support thegulocal com_uk_one-time-checkout (2)

maloky avatar May 08 '25 13:05 maloky

Size Change: +373 B (+0.03%)

Total Size: 1.46 MB

Filename Size Change
./public/compiled-assets/webpack/468.js 0 B -34.7 kB (removed) 🏆
./public/compiled-assets/webpack/649.js 34.9 kB +34.9 kB (new file) 🆕
â„šī¸ View Unchanged
Filename Size Change
./public/compiled-assets/javascripts/[countryGroupId]/events/router.js 92.4 kB +23 B (+0.02%)
./public/compiled-assets/javascripts/[countryGroupId]/router.js 98.5 kB +14 B (+0.01%)
./public/compiled-assets/javascripts/ausMomentMap.js 108 kB 0 B
./public/compiled-assets/javascripts/contributionsRedirectStyles.js 20 B 0 B
./public/compiled-assets/javascripts/downForMaintenancePage.js 69.8 kB +7 B (+0.01%)
./public/compiled-assets/javascripts/error404Page.js 69.8 kB +4 B (+0.01%)
./public/compiled-assets/javascripts/error500Page.js 69.7 kB +5 B (+0.01%)
./public/compiled-assets/javascripts/favicons.js 618 B 0 B
./public/compiled-assets/javascripts/paperSubscriptionLandingPage.js 90.5 kB +22 B (+0.02%)
./public/compiled-assets/javascripts/payPalErrorPage.js 68.3 kB +3 B (0%)
./public/compiled-assets/javascripts/payPalErrorPageStyles.js 20 B 0 B
./public/compiled-assets/javascripts/promotionTerms.js 76.1 kB +20 B (+0.03%)
./public/compiled-assets/javascripts/subscriptionsLandingPage.js 100 kB +22 B (+0.02%)
./public/compiled-assets/javascripts/unsupportedBrowserStyles.js 20 B 0 B
./public/compiled-assets/javascripts/weeklySubscriptionCheckoutPage.js 159 kB +13 B (+0.01%)
./public/compiled-assets/javascripts/weeklySubscriptionLandingPage.js 94 kB +19 B (+0.02%)
./public/compiled-assets/webpack/100.js 5.8 kB 0 B
./public/compiled-assets/webpack/231.js 20.2 kB +15 B (+0.07%)
./public/compiled-assets/webpack/460.js 14.4 kB 0 B
./public/compiled-assets/webpack/471.js 24.2 kB 0 B
./public/compiled-assets/webpack/474.js 4.98 kB 0 B
./public/compiled-assets/webpack/500.js 3.52 kB 0 B
./public/compiled-assets/webpack/566.js 4.36 kB 0 B
./public/compiled-assets/webpack/63.js 2.17 kB 0 B
./public/compiled-assets/webpack/741.js 8.81 kB 0 B
./public/compiled-assets/webpack/751.js 7.08 kB -47 B (-0.66%)
./public/compiled-assets/webpack/778.js 107 kB 0 B
./public/compiled-assets/webpack/935.js 25.5 kB 0 B
./public/compiled-assets/webpack/943.js 7.58 kB 0 B
./public/compiled-assets/webpack/checkout.js 18.7 kB -145 B (-0.77%)
./public/compiled-assets/webpack/GuardianAdLiteLanding.js 8.4 kB 0 B
./public/compiled-assets/webpack/LandingPage.js 15.4 kB 0 B
./public/compiled-assets/webpack/oneTimeCheckout.js 7.36 kB +161 B (+2.24%)
./public/compiled-assets/webpack/ThankYou.js 43.6 kB 0 B

compressed-size-action

github-actions[bot] avatar May 08 '25 13:05 github-actions[bot]

Seen on PROD (merged by @maloky 9 minutes and 54 seconds ago)

Sentry Release: support-client-side, support

prout-bot avatar May 15 '25 14:05 prout-bot