Skip to content

Track end-to-end photo funnel in Plausible#115

Merged
mostafazh merged 1 commit into
TechForPalestine:mainfrom
mostafazh:analytics-photo-funnel
Jun 17, 2026
Merged

Track end-to-end photo funnel in Plausible#115
mostafazh merged 1 commit into
TechForPalestine:mainfrom
mostafazh:analytics-photo-funnel

Conversation

@mostafazh

Copy link
Copy Markdown
Collaborator

What

Instruments the full conversion funnel as Plausible custom events so it can be monitored end to end. Events are numbered so they stay ordered in the Plausible dashboard:

# Event Fires when
1 Funnel: 1 Landed visitor opens the page
2 Funnel: 2 Source Selected clicks a "pick a photo" button (upload or a social platform)
3 Funnel: 3 Photo Provided chooses a file / submits a username
4 Funnel: 4 Photo Fetched a usable source is obtained (data URL / social profile URL)
5 Funnel: 5 Preview Shown the photo actually renders on screen
6 Funnel: 6 Downloaded the final framed image is downloaded

Plus a non-funnel Start Over event when a user resets to pick a different photo.

Every event past step 1 carries a method prop (user-upload, twitter, github, gitlab, bluesky) so drop-off can be segmented by photo source.

Steps 4 and 5 are deliberately distinct and catch different failure modes:

  • 3 → 4 drop-off: social fetch returned nothing / file read failed (no usable source).
  • 4 → 5 drop-off: a source URL was obtained but the image is broken (404 / CORS / decode error) and never renders.

How

  • New typed helper src/lib/analytics.ts exposing a FunnelEvent map and a safe trackEvent() wrapper that no-ops during SSR and before the Plausible script has loaded.
  • Wired the events into the photo flow in src/app/page.tsx.

Setting up the funnel in Plausible

In the Plausible dashboard (Settings → Funnels), create a funnel from the six numbered custom-event goals, in order, to visualize end-to-end conversion and per-step drop-off.

🤖 Generated with Claude Code

Instrument the full conversion funnel as numbered Plausible custom
events so it can be monitored end to end, plus a Start Over event.

Adds a typed analytics helper (src/lib/analytics.ts) with a safe
trackEvent() wrapper that no-ops during SSR or before the Plausible
script loads, and wires the events into the photo flow.

Funnel:
  1 Landed          - visitor opens the page
  2 Source Selected - clicks a "pick a photo" button (upload / social)
  3 Photo Provided  - chooses a file / submits a username
  4 Photo Fetched   - a usable source is obtained (data URL / profile URL)
  5 Preview Shown   - the photo actually renders on screen
  6 Downloaded      - the final framed image is downloaded
Plus Start Over (non-funnel) - user resets to pick a different photo.

Events past step 1 carry a `method` prop (user-upload / twitter /
github / gitlab / bluesky) so drop-off can be segmented by source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mostafazh mostafazh merged commit 6fb354f into TechForPalestine:main Jun 17, 2026
1 check passed
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