Open
Description
Is your feature request related to a problem? Please describe.
We need to ensure which country the request originates from before tracking is enabled. This is done using a server side check.
The issue we are facing is that we want to start collecting events as soon as possible, but if the response from the server is delayed then we might miss some initial tracking calls.
Describe the solution you'd like
Ideally we should be able to enable the tracking but be able to postpone sending the events. Based on the response we would either send off the and return to normal tracking or drop the events and disable the tracker.
Describe alternatives you've considered
- Creating custom event emitter - we could have a lot more control over how events are sent and if they are saved in the events store - emitter is async in it’s nature so it would be really easy to hook into a pipeline with our allowed countries check
- custom events store - we can block events from being retrieved from a store by creating our own custom implementation. Drawback is that in my opinion the event store should be a “dumb” component and shouldn’t be used to decide whether we can track or not.
Additionally we still need to block events that are to big for an events store - either with do not track cookie either with custom fetch
Additional context