Open Nuhasami opened 2 years ago
Thanks for the kind words!
Hmm I don't think we have anything out of the box to do this but I think you should be able to push to some persistent array during your dispatch()
call and then compare with the previously dispatched event. If it is a dupe you can just return early and not push to your dataLayer.
Happy to look at an example if you have a more concrete use case you'd like to discuss.
First of all, thank you for this really neat work!
Secondly, I simply want to make sure I don't send duplicates. I was thinking maybe I can check prevData and currentData before dispatching in useTracking. Is there a way to do that? I hope my question is clear, apologies if it's not. 😸