Track end-to-end photo funnel in Plausible#115
Merged
mostafazh merged 1 commit intoJun 17, 2026
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Funnel: 1 LandedFunnel: 2 Source SelectedFunnel: 3 Photo ProvidedFunnel: 4 Photo FetchedFunnel: 5 Preview ShownFunnel: 6 DownloadedPlus a non-funnel
Start Overevent when a user resets to pick a different photo.Every event past step 1 carries a
methodprop (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:
How
src/lib/analytics.tsexposing aFunnelEventmap and a safetrackEvent()wrapper that no-ops during SSR and before the Plausible script has loaded.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