You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is it safe to call posthog methods (e.g. posthog.capture) beforeposthog.init() has been called? will they be queued and flushed when (and if) the posthog client is eventually initialized?
I ask because we are considering moving to an architecture where we lazily initialize posthog once some async initial data is fetched (e.g. an initial distinctID for providing to posthog.initialize({bootstrap: distinctId})
The text was updated successfully, but these errors were encountered:
from a quick skim of the source, it looks like the answer to my question is "no, don't do that"
however, I'd love for someone on the posthog team to chime in here as to the recommended best practice when a user's distinct ID is not known immediately
is it safe to call posthog methods (e.g.
posthog.capture
) beforeposthog.init()
has been called? will they be queued and flushed when (and if) the posthog client is eventually initialized?I ask because we are considering moving to an architecture where we lazily initialize posthog once some async initial data is fetched (e.g. an initial
distinctID
for providing toposthog.initialize({bootstrap: distinctId})
The text was updated successfully, but these errors were encountered: