braze-inc / braze-web-sdk

Public repo for the Braze Web SDK
https://www.braze.com
Other
73 stars 25 forks source link

Detecting if service is opt-out #106

Closed nitzanashi closed 2 years ago

nitzanashi commented 3 years ago

Once the user opt-out we call stopWebTracking which once called it disabling the service according to docs. We wonder if it's possible to know if the service is disabled or not other than keep track internally. When the user visits the page and previously the service was disabled we have to call resumeWebTracking when we want to resume tracking.

Currently, we call resumeWebTracking on every visit in our App if we have user consent from the internal consent tool but it might be that the user never disabled tracking.

wesleyorbin commented 3 years ago

Hi @nitzanashi! Thanks for reaching out. We're planning on introducing this ability in a future release. We have an internal ticket filed and I'll update you here once it's been released.

nitzanashi commented 3 years ago

Hey @wesleyorbin thanks for the fast response, so for the time being would you recommend continuing with the described behavior? calling resumeWebTracking on every initializing?

wesleyorbin commented 3 years ago

@nitzanashi The described behavior seems appropriate for your use case and you can continue using it for the time being.

wesleyorbin commented 2 years ago

Hi @nitzanashi! We just released v3.5.0, which contains a new method appboy.isDisabled() that returns whether or not the SDK has been disabled via stopWebTracking(). I'm going to close this out, but feel free to re-open if this does not solve your use case.