Replies: 1 comment 2 replies
-
you could either add an event processor (recommended) or have a condition in Sentry.addEventProcessor((event) => {
if (!userHasGivenConsent) {
return null;
}
return event;
}) That way, all events are dropped unless the user has given consent. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to start/stop sending events when user consents. There is a privacy banner on the page (using iubenda) and it basically takes a callback in its config like so:
I'm using the loader script and sentryOnLoad before the script. I've gotten this far:
This successfully stops Sentry from sending events however I don't understand how I could do enabled: true after init. Or even if this is the right way of doing it?
Any guidance is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions