MozillaFoundation / donate-wagtail

[Legacy] - Wagtail based donation stack
Mozilla Public License 2.0
43 stars 22 forks source link

Allow custom FRU form ID as URL query parameter #1752

Closed danielfmiranda closed 1 year ago

danielfmiranda commented 1 year ago

Description

Stakeholders have asked for the ability to render a page with a different FRU form element for campaign tracking purposes.

One example from stakeholders would be the FireFox sites "about" page, which has a link that sends users to the donate landing page with some extra UTM parameters: https://donate.mozilla.org/en-US/?utm_source=firefox&utm_medium=referral&utm_campaign=firefox_about&utm_content=firefox_about

Stakeholders would like an alternate FRU form element to render on the landing page if users are visiting the donate landing page through this link.

I think the best way to implement this would be through passing in a custom form id through a URL query parameter such as form_id=123abc.

This allows stakeholders to render the page with an alternate FRU form without the need to create a new page in wagtail.

Dev tasks

Acceptance Criteria

danielfmiranda commented 1 year ago

Hi @mmmavis!

This has been merged into the donate staging site, and I was wondering if you could please help me QA this?

All thats needed is to check that https://donate-wagtail.mofostaging.net/en-US/?form_id=XVFNMBAK renders a different FRU form (with blue buttons) than the default form.

Anything else, ?form_id=invalid_id, ?form_id=, should just render the default form.

Thanks in advance!

mmmavis commented 1 year ago

@danielfmiranda yup I confirmed that embedded form looked different on https://donate-wagtail.mofostaging.net/en-US/?form_id=XVFNMBAK than the default!

mtdenton commented 1 year ago

@danielfmiranda can this be closed?

danielfmiranda commented 1 year ago

Hi @mtdenton thanks for checking, yes it can. Closing!