Skip to content

docs: donation embed & redirect-to-thank-you-page documentation - #1364

Draft
caseyhelbling wants to merge 2 commits into
supporter_level_goalfrom
docs/donation-embed-redirect
Draft

docs: donation embed & redirect-to-thank-you-page documentation#1364
caseyhelbling wants to merge 2 commits into
supporter_level_goalfrom
docs/donation-embed-redirect

Conversation

@caseyhelbling

Copy link
Copy Markdown

What

Adds documentation for the donation form's embed parameters, prompted by a client (Warrior Foundation) hitting the common pitfalls when hand-writing a redirect iframe. None of this was documented anywhere (not the Help Scout KB, not the repo, not the tix/houdini wikis).

Files

  • docs/donation-iframe-embed.md — engineering source-of-truth. Full table of every embed query param and its data-* button equivalent, plus the redirect / skipFinish / offsite interaction and URL-construction rules. Verified against the widget/donate source (file refs included in the doc).
  • docs/help-center/redirecting-donors-to-a-custom-thank-you-page.md — customer-facing Help Scout article source (nonprofit-friendly).
  • docs/help-center/README.md — explains the help-center source folder and contains the CSR handoff notes.

Key facts documented (verified in code)

  • A URL has only one ? — a second ? silently swallows redirect into the previous param (the bug the client hit).
  • & is HTML encoding, correct inside an iframe src; never typed in an address bar, never %26-encoded.
  • skipFinish is iframe/query-only — there is no data-skip-finish on the donate button.
  • The Finish button is gated on offsite=t (followup-step.js), which is why the button method redirects after "Finish" and the iframe+skipFinish redirects automatically.
  • The redirect value only needs URL-encoding once its destination has its own query string (e.g. UTMs).

Handoff

  • CSR (Carson): the Help Scout article is ready to load — see docs/help-center/README.md for title/category/related-links.
  • Draft PR — docs only, no code changes.

Document the donation form's embed parameters (donate button and custom
iframe), with emphasis on the redirect / skipFinish / offsite interaction
that is easy to get wrong.

- docs/donation-iframe-embed.md: engineering source-of-truth for all embed
  query params and their data-attribute equivalents, plus the URL-construction
  rules (single ?, & encoding, redirect encoding for UTM destinations).
- docs/help-center/: Help Scout article source for nonprofits, covering
  redirecting donors to a custom thank-you page, with a README handoff for CSR.
A hand-written iframe cannot perform the redirect on its own: on completion
the form posts a commitchange:redirect message to the parent, and only the
loader script (donate-button.v2.js) listens for it and navigates. Without the
script on the host page, the redirect silently does nothing (the issue a live
client hit).

- Engineering doc: new section on the host-page listener requirement, the
  script snippet, and the stylesheet/resize side effect.
- Help Scout article: iframe method now has Step 1 (add helper script) +
  Step 2 (iframe), a resize heads-up, and a troubleshooting entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant