Skip to content

fix(tracking): track donations client-side via QGIV.donationComplete#473

Merged
mohanadft merged 1 commit into
mainfrom
fix/plausible-client-side-final
May 31, 2026
Merged

fix(tracking): track donations client-side via QGIV.donationComplete#473
mohanadft merged 1 commit into
mainfrom
fix/plausible-client-side-final

Conversation

@mohanadft
Copy link
Copy Markdown
Collaborator

Summary

  • donate.astro: Listens to QGIV.donationComplete and reads data.QGIV.transaction — confirmed from live payload inspection. Uses transaction.recurring (boolean) and transaction.frequency to distinguish monthly vs one-time. Uses transaction.total for amount and guards on transaction.status === "Accepted".

  • qgiv-webhook.ts: Removes the server-side Plausible tracking entirely. It was being silently dropped by Plausible's bot filter because Zapier's datacenter IP was being forwarded instead of the donor's real browser IP. Client-side tracking replaces it completely.

Confirmed payload fields (from live donation)

"transaction": {
  "frequency": "One Time",
  "recurring": false,
  "status": "Accepted",
  "total": 1
}

Test plan

  • One-time donation → One-time-donate appears in Plausible
  • Monthly donation → Monthly-donate appears in Plausible
  • Counts match Qgiv

Uses transaction.recurring (boolean) and transaction.frequency confirmed
from live payload inspection. Removes server-side Plausible tracking from
the webhook — it was being silently dropped due to Zapier's datacenter IP.
Client-side tracking fires from the donor's real browser, accepted every time.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4fd8589
Status: ✅  Deploy successful!
Preview URL: https://5db9374f.website-aun.pages.dev
Branch Preview URL: https://fix-plausible-client-side-fi.website-aun.pages.dev

View logs

@mohanadft mohanadft merged commit 2e4e2c1 into main May 31, 2026
5 checks passed
@mohanadft mohanadft deleted the fix/plausible-client-side-final branch May 31, 2026 12:58
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