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

expose analytics to initialize #1142

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

silesky
Copy link
Contributor

@silesky silesky commented Sep 11, 2024

analytics.ready(() => waits for all destinations to be loaded which is a bit slow. When you just need the current (initial) user, you can use 'initialize' instead.

Needed for the snippet.

analytics.on('initialize', (_settings,  _opts, analytics) => console.log(analytics.user())

Copy link

changeset-bot bot commented Sep 11, 2024

🦋 Changeset detected

Latest commit: 9459709

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@segment/analytics-next Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@silesky silesky marked this pull request as ready for review September 25, 2024 15:48
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