posthog-js
posthog-js copied to clipboard
using the API before posthog.init() is called
is it safe to call posthog methods (e.g. posthog.capture
) before posthog.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})