-
Notifications
You must be signed in to change notification settings - Fork 18
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
Sometimes register event twice in next.js #95
Comments
Hey @nnfans not from the clever tap team, but can it be because of the fact that you are using React 18 and use effect having double runs? Maybe try to debug mode and check if requests are going twice. |
hi @abhu-A-J, you can reproduce it. I already disable the restrict mode that make useEffect fired twice |
any updates on this? |
@nnfans This issue is fixed. Kindly update the clevertap-web-sdk package to the latest version v1.6.6. |
Sometimes the event that triggered appears twice in the clevertap activity tab
Screen.Recording.2022-12-02.at.10.05.57.mov
Printed console:
Registered event
Step to reproduce
yarn
.env.local
NEXT_PUBLIC_CT_ID=
and fille with clevertap idyarn dev
Why don't we change the implementation to use fetch api or any http request library instead of appending
script
tag insidehead
tag and place the query inside itclevertap-web-sdk/src/util/requestDispatcher.js
Lines 66 to 78 in 7680813
The text was updated successfully, but these errors were encountered: