Skip to content

Is it necessary to 'await' the response of Analytics logEvent function? #4572

Answered by CTOverton
cenobyte321 asked this question in Q&A
Discussion options

You must be logged in to vote

... 4 years later haha

@cenobyte321 since the logEvent doesn't return data you don't even need the .then you can simply do

Here is a very minimal way to write it

logEvent(...).catch(console.error)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@cenobyte321
Comment options

@mikehardy
Comment options

@CTOverton
Comment options

Answer selected by cenobyte321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants