Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: have track calls await on session replay init promise #6

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

kwalker3690
Copy link
Contributor

Per advice given in this Segment issue: segmentio/analytics-next#1120 (comment), add an await to each track/page/identify call to ensure that session replay initialization has occurred before any events go through.

I've confirmed via manual testing that with this change, all events are not sent until session replay has finished initializing, including Page Loaded and immediately sent events.

Copy link
Collaborator

@lewgordon-amplitude lewgordon-amplitude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kwalker3690 kwalker3690 merged commit 1269619 into main Jul 24, 2024
2 checks 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.

2 participants