-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add initialization error events #396
Add initialization error events #396
Conversation
✅ Deploy Preview for pendulum-pay ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
if (!pendulumNode.apiComponents?.api && pendulumNode?.isFetched) { | ||
setApiInitializeFailed(true); | ||
trackEvent({ event: 'initialization_error', error_message: 'node_connection_issue' }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as I would like to add this to the useEffect
below that sets the signing service error, they depend on different queries and would trigger multiple times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea with persisting the events in localstorage to reduce the event count. However, I think we can simplify this. I assume that GA is smart enough to know that a user is still the same when they refresh the page because cookies are used to track that. So if the same user gets the same initialization error in the same session, it wouldn't matter for our analytics. That's why I think we can remove the extra logic with persisting in the local storage.
I also corrected the measurement ID and event name of the initialization_error tag in GTM. It should work now.
@ebma I tested on tag manager (using the preview tab) the event at the time, and it was fired and registered. Just to know for next time, what was the issue there? Regarding multiple firing, I think for some analysis we will have a harder time if we have these multiple events, for example for counting each or the share of each w.r.t. all errors, etc. Can we test if they are filtered automatically? I tried adding on GA the analysis, but realized that it would only work once this is in staging or production. |
I'm not sure. Let's ask the others. |
Closes #391
Changes
InitializationErrorEvent
.ready
andinitializeFailedMessage
are set on the main component.fetchSigningServiceAccountId
such that it distinguishes errors.Additional notes
The new tag
initalization_error
was added to tag manager and tested on the preview.