Open bruno-garcia opened 1 year ago
@AbhiPrasad any notes on why we decided not to go ahead with this?
Nope, I think it just fell through the cracks. I moved it to Archived since it was a stale-bot closed issue. We can re-open and backlog!
Hi. What is expected way of handling user consent until this issue is resolved?
Add <script>
/call Sentry.init
only after user has agreed to gathering analytics? Something else?
@zemlanin Calling Sentry.init()
only when consent was given is one way to do it. Another would be to delay events in the transport, that way you would not lose events that happened before the user gave consent. But that is a bit more involved.
The offline transports have hooks that can allow you to queue events until user consent.
Have the SDK operate ‘properly’, with it's configured features such as Replay. But ‘hold off’ on sending events until consent is given. If revoked stop events from being sent again.
Sentry Native already supports user consent (not for all backends though), we can borrow the idea and do something similar getsentry/sentry-native@a51ccbb/src/sentry_options.c#L276-L286
Relates to:
Specifically:
There's an internal doc that should be moved to GitHub.