Hello, team! I found a mention of a Real-Time feat...
# ask-questions
c
Hello, team! I found a mention of a Real-Time feature in the JS SDK code, however, I haven’t found documentation related to it. I’d be happy if you could explain the feature to me, in special how the
trackFeatureUsage
https://github.com/growthbook/growthbook/blob/main/packages/sdk-js/src/GrowthBook.ts#L164 works and what the request it makes to
<http://growthbook.io|growthbook.io>
https://github.com/growthbook/growthbook/blob/main/packages/sdk-js/src/GrowthBook.ts#L200 do.
f
Are you using the cloud? we have it testing in beta
I can enable it for your account if you’d like to try it out
c
Hello, Graham. Thank you for your reply. Yes, I am using the cloud. However, there is no need to enable it.
However, I’d be happy to know if the data collected here https://github.com/growthbook/growthbook/blob/main/packages/sdk-js/src/GrowthBook.ts#L200 is accessible only by the cloud clients or is it a tracking data collected by GrowthBook to know how us, GrowthBook clients, is using that feature?
f
By default, that tracking call is never fired.
Copy code
if (!this.context.realtimeKey) return;
You need to explicitly define a
realtimeKey
when instantiating the GrowthBook object to enable that beta feature.
Our plan is to keep the SDK 100% local by default (no external HTTP requests made). Then, we can add opt-in functionality like realtime usage tracking on top of that core. When enabled, the realtime usage can show you, for example, how many times each feature is evaluated and which rules are being used.
It's not for us to track you, it's to help you debug how your feature flags are being used by your users.
c
Hi @future-teacher-7046 and @fresh-football-47124. Thank you both for time. I really appreciated that. I understand the HTTP usage now, Jeremy. Thank you. 🙂
@future-teacher-7046 Is there any plan to add an environment levels access, for example block access to production environment to a certain user role?
f
yes, we're planning to launch per-environment permissions this month
c
That would be awesome! Thank you once again.