Claude/share button mobile bug 3aekma - #117
Merged
Merged
Conversation
Feat/mobile carousel
Feat/mobile carousel
posthog.capture batches events by default and relies on a periodic
flush (or a pagehide/navigation flush) to actually send them. The copy
link button doesn't navigate, so on mobile users tap it and immediately
switch apps to paste the link, freezing the page before the batch flushes
— and iOS doesn't reliably fire pagehide on app-switch, so the queued
share_created event was silently dropped. The email/linkedin/native
channels navigate or open a sheet, which flushes the queue on the way
out, so only copy was affected.
Send the event with { send_instantly: true } so it goes out on the tap
instead of waiting for the batch, across every channel.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W8Zx2fvJxFSGKm9MpetRqg
ShareButton mints an opaque ?s=<id> on each share_created event, but nothing recorded the other side of the funnel: someone opening a shared link. Add a global ShareOpenedTracker in the root layout that, on the initial document load (the moment the id is still on window.location), fires share_opened with the same share_id — the join key back to the share that produced the open — then removes s from the address bar via history.replaceState so the id isn't re-shared, bookmarked, or double-counted on refresh. Renders nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8Zx2fvJxFSGKm9MpetRqg
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.
No description provided.