analytics-next icon indicating copy to clipboard operation
analytics-next copied to clipboard

expose analytics to initialize

Open silesky opened this issue 1 year ago • 1 comments

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())

silesky avatar Sep 11 '24 16:09 silesky

🦋 Changeset detected

Latest commit: 9459709b8d49e20ae9e9582d16889a7172bfcea2

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

changeset-bot[bot] avatar Sep 11 '24 16:09 changeset-bot[bot]