Closed mtdenton closed 1 year ago
After taking a look at the new petition set up, it appears that the button which is used to render the FRU form is defined in the file petition-thank-you.jsx
.
In this file, the "Thanks, Ill Chip in" button is set to link to the relative URL ?form=donate
with no other parameters.
I believe this is the reason that any donations made using through this flow are having the UTM parameters stripped.
I think we can solve this through the following steps:
Implement https://github.com/MozillaFoundation/foundation.mozilla.org/issues/10579. We can then update the default relative URL generated here to something along the lines of ?form=donate&campaign_id=petition.campaign_id
Implement https://github.com/MozillaFoundation/foundation.mozilla.org/issues/10846. With the URL now editable, users will be able to change the form ID to whichever specific FRU form is related to the petition, as well as any other UTM parameters they would like passed to salesforce/FRU. If no custom URL is set, we can have the URL default to form=donate
Tagging @mtdenton to take a look and let me know if it looks like I'm missing anything. 👍 thanks!
That sounds perfect @danielfmiranda , but I would maybe add one thing: If UTM parameters are present in the page's URL, how hard would it be to grab those with JS from window.location.href
and append them to the back of the CTA's URL? So you would end up with something like:
?form=donate&campaign_id=xxxxxxxxx&utm_campaign=whatever&utm_xxx.....
Here's a FRU doc article that reinforces that thinking. Lots of browsers will strip that UTM info (as they should) but some will carry forward attribution into FRU's GA integration. Let me know what you think!
Also noting that to avoid creep on this approach, we could take the UTM JS part and create a separate ticket to be done later.
Thanks @mtdenton! I like the approach of implementing the first two tickets, and then implementing your request in a separate ticket to bring it all together (after taking a look at the code, I think your request will take a couple of hours as it appears I am going to need to make a small update to the backend as well.)
I have made this ticket to capture the work https://github.com/MozillaFoundation/foundation.mozilla.org/issues/10888 and will get to it as soon as I finish the other two. Thanks!
Since we have everything spelled out for implementation, I am going to close this spike ticket.
We need to figure out how to mark a donation as coming from Petitions when someone comes from a petition page and successfully donates on the FRU modal.
The goal of the ticket is to list out some concrete steps to establish attribution using the Salesfore Campaign ID as the source of truth.
Timebox: 1 hour