Open nnfans opened 1 year ago
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 https://github.com/nnfans/clevertap-repro/blob/main/next.config.js
any updates on this?
@nnfans This issue is fixed. Kindly update the clevertap-web-sdk package to the latest version v1.6.6. Let us know if it's resolved for you or issue still persists.
Sometimes the event that triggered appears twice in the clevertap activity tab
https://user-images.githubusercontent.com/10711718/205206342-19e52541-e2d5-42a6-acd0-91b498710cb0.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 it https://github.com/CleverTap/clevertap-web-sdk/blob/76808137f1e710a8811df8ef1421248abd5f3c43/src/util/requestDispatcher.js#L66-L78