KNOWLEDGE BASE

Useful treasure trove of knowledge

Constantijn Schepens
Friday, January 7, 2022, 4:02 PM
:one: on a per user basis is interesting to me, also for automated acceptance tests.
Vineeth
Friday, January 7, 2022, 7:08 AM
We’d love to see the type of dashboards you're creating and how we can complement it with data!
Bilal Quadri
Friday, January 7, 2022, 4:23 AM
Oh, one other thing: We're adopting a process of creating dashboards for major feature launches. It'd be awesome to have get APIs that provide useful summary info to showcase in http://shields.io|shields.io style badges.
Bilal Quadri
Friday, January 7, 2022, 4:22 AM
Those use-cases cover our needs, I think. Being able to programatically retrieve and approve changes needing review would also be nice.
Vineeth
Thursday, January 6, 2022, 8:01 PM
cc: Bilal Quadri, Omar Guenena (Lime), Sega Okhiria, Michael Koch as people that've mentioned some variant of this.
Vineeth
Thursday, January 6, 2022, 8:01 PM
*Management API for Statsig* One of the things we're planning in 2022 is a Management API for Statsig. We've heard about the need for this and would love to understand some of the scenarios you care about using when we build out this API. Some examples of scenarios we've heard of - 1. *Overrides for test automation* : You'd like to be able to turn on/off features and experiments within automated tests 2. *Simplifying oncall response* to turn features/experiments off : You want to surface internal UX that allows your oncalls to see and turn off malfunctioning features/experiments without all the oncalls having to be familiar with Statsig 3. *Turning features on/off with limited scope* : You want to expose UI that allows individuals to make very scoped changes using business logic you own (eg. employees in Paris can change the rule within a feature gate that impacts users in Paris) 4. *CI/CD integration* : You want to build automation into your pipelines to check for existence of feature gates/experiments before promoting code into an environment. 5. *Feature Gate Creation* : You want to be able to define/create these in code. 6. *Experiment Creation* : You want to be able to define/create these in code. Are there scenarios you care about that you'd add here? I'd love to understand better use cases you're thinking about for these!
Vineeth
Thursday, January 6, 2022, 8:01 PM
cc: Bilal Quadri, Omar Guenena (Lime), Sega Okhiria, Michael Koch as people that've mentioned some variant of this.
Bilal Quadri
Friday, January 7, 2022, 4:22 AM
Those use-cases cover our needs, I think. Being able to programatically retrieve and approve changes needing review would also be nice.
Bilal Quadri
Friday, January 7, 2022, 4:23 AM
Oh, one other thing: We're adopting a process of creating dashboards for major feature launches. It'd be awesome to have get APIs that provide useful summary info to showcase in http://shields.io|shields.io style badges.
Vineeth
Friday, January 7, 2022, 7:08 AM
We’d love to see the type of dashboards you're creating and how we can complement it with data!
Constantijn Schepens
Friday, January 7, 2022, 4:02 PM
:one: on a per user basis is interesting to me, also for automated acceptance tests.
Grace Hong
Thursday, January 6, 2022, 6:52 PM
Thank you for the support.
Kaio Duarte
Thursday, January 6, 2022, 6:51 PM
Great, perfect timing! :smile: I'll give it a look, thanks Vineeth.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 6:13 PM
Correction to what I said above: “Users” tab today only include data from production environment, which was why this user is not showing up there.
Vineeth
Thursday, January 6, 2022, 6:10 PM
Hey Kaio (and welcome Apollo350 team)! Usually a good way to think about it is a project = a product. If the product has many endpoints (eg. iOS/Web/Android) or environments - but are likely to share similar KPIs - or even feature gates, putting them in the same project makes managing them easier. You'll have one place to understand how a feature is doing (and eventually slice/troubleshoot by endpoint or environment) - rather than navigating across projects. We just published an article that talks about the environment part of this, and some of the tooling we've built there that you may find interesting - https://blog.statsig.com/environments-on-statsig-6a818805b3c2
Marcos Arribas (Statsig)
Thursday, January 6, 2022, 6:09 PM
Hey Joel Witten, right now it forwards all events, we'll look into adding some functionality in the new few weeks to let you configure which events get forwarded.
Kaio Duarte
Thursday, January 6, 2022, 5:44 PM
Hi team! What’s the best practice for Statsig projects? One project per env (stage/prod) or project per team (web/API/ios)? Thanks in advance!
Vineeth
Thursday, January 6, 2022, 6:10 PM
Hey Kaio (and welcome Apollo350 team)! Usually a good way to think about it is a project = a product. If the product has many endpoints (eg. iOS/Web/Android) or environments - but are likely to share similar KPIs - or even feature gates, putting them in the same project makes managing them easier. You'll have one place to understand how a feature is doing (and eventually slice/troubleshoot by endpoint or environment) - rather than navigating across projects. We just published an article that talks about the environment part of this, and some of the tooling we've built there that you may find interesting - https://blog.statsig.com/environments-on-statsig-6a818805b3c2
Kaio Duarte
Thursday, January 6, 2022, 6:51 PM
Great, perfect timing! :smile: I'll give it a look, thanks Vineeth.
Grace Hong
Thursday, January 6, 2022, 5:00 PM
Not at all. Let me DM you with more details.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 4:56 PM
I see. Do you mind sending me more details about this user, like the experiment they were exposed to, and the user ID, so we can look into it? Feel free to DM me privately
Grace Hong
Thursday, January 6, 2022, 4:53 PM
Jiakan Wang (Statsig) hi Jiakan, thank you for checking it. Noted. I just checked the user created yesterday morning under development but the user still doesn’t show up. It has been over 24 hours since the user was initialized.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 4:41 PM
Hi Grace! The “Users” tab does support users under all environment tiers, but it’s not real-time like the event stream. Users who are exposed today will show up under the “Users” tab tomorrow
Grace Hong
Thursday, January 6, 2022, 3:12 PM
Hi Statsig Team! We are looking into integration Statsig into our product. By using the `StatsigOptions` to differentiate the environment, the user info shows up under the experiment properly. (please check the screenshot attached). But when I tried to look up that specific user under the Analyze Users by the userID, I cannot find the user. I’m wondering if the user search function under analyze doesn’t support users under statsigEnvironment development.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 4:41 PM
Hi Grace! The “Users” tab does support users under all environment tiers, but it’s not real-time like the event stream. Users who are exposed today will show up under the “Users” tab tomorrow
Grace Hong
Thursday, January 6, 2022, 4:53 PM
Jiakan Wang (Statsig) hi Jiakan, thank you for checking it. Noted. I just checked the user created yesterday morning under development but the user still doesn’t show up. It has been over 24 hours since the user was initialized.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 4:56 PM
I see. Do you mind sending me more details about this user, like the experiment they were exposed to, and the user ID, so we can look into it? Feel free to DM me privately
Grace Hong
Thursday, January 6, 2022, 5:00 PM
Not at all. Let me DM you with more details.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 6:13 PM
Correction to what I said above: “Users” tab today only include data from production environment, which was why this user is not showing up there.
Grace Hong
Thursday, January 6, 2022, 6:52 PM
Thank you for the support.
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 1:15 AM
You do not need to explicitly call `initialize()` if you are using the component. That function is for people who use plain javascript
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 1:14 AM
No the SDK will only send events after it’s been initialized. Looks like you are using the react SDK, correct? Assuming you are using the `StatsigProvider` component, you will want to make sure the `user` object you pass into that component has the `userID`
Bas Nguyen
Thursday, January 6, 2022, 1:13 AM
so the statsig client will send event even if it’s not been initialized?
tore (statsig)
Thursday, January 6, 2022, 1:11 AM
Or if you are using a client SDK, are you sure the user object you passed in `initialize()` has a userID set?
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 1:10 AM
Hi Bas - are you sure userID was specifically set when you logged those events?
Bas Nguyen
Thursday, January 6, 2022, 1:09 AM
hi team, I’m getting some events logged without a UserID, any ideas why that is?
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 1:10 AM
Hi Bas - are you sure userID was specifically set when you logged those events?
tore (statsig)
Thursday, January 6, 2022, 1:11 AM
Or if you are using a client SDK, are you sure the user object you passed in `initialize()` has a userID set?
Bas Nguyen
Thursday, January 6, 2022, 1:13 AM
so the statsig client will send event even if it’s not been initialized?
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 1:14 AM
No the SDK will only send events after it’s been initialized. Looks like you are using the react SDK, correct? Assuming you are using the `StatsigProvider` component, you will want to make sure the `user` object you pass into that component has the `userID`
Jiakan Wang (Statsig)
Thursday, January 6, 2022, 1:15 AM
You do not need to explicitly call `initialize()` if you are using the component. That function is for people who use plain javascript
Vineeth
Wednesday, January 5, 2022, 4:35 PM
+ Marcos Arribas (Statsig); we can likely support that kind of filtering in the outbound integration.
Annabel St John-Lyle
Wednesday, January 5, 2022, 4:10 PM
Thanks for the welcome, and Happy new year everyone!
Joel Witten
Wednesday, January 5, 2022, 3:40 PM
Hey all - how does the Fivetran integration work? does it forward all events to fivetran or can I specify? I only want to pull exposure events from Statsig, rather than all events I am forwarding (purchase, login, etc). This is because I am using a CDP and am already pulling the data back into my DW, so don’t want to have to do it (and pay for it) twice
Vineeth
Wednesday, January 5, 2022, 4:35 PM
+ Marcos Arribas (Statsig); we can likely support that kind of filtering in the outbound integration.
Marcos Arribas (Statsig)
Thursday, January 6, 2022, 6:09 PM
Hey Joel Witten, right now it forwards all events, we'll look into adding some functionality in the new few weeks to let you configure which events get forwarded.
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 8:19 AM
Agreed. It’s not in there because it’s not officially supported this way for the HTTP API, and if we were to support it we’ll likely make it easier to pass it in, likely in the `customIDs` object just like other type of IDs. We’ll get to it at some point for sure
Daiki Takaya
Wednesday, January 5, 2022, 8:08 AM
Thank you so much!!!!!! I will try it. The number of messages in Slack is approaching its limit, so I felt that others would be happy to see that mentioned in the official documentation. Thanks!
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 7:52 AM
Hope this helps!
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 7:52 AM
Alternatively, as I mentioned earlier, you can define your own ID type, and use that in both your client/server/http API/SDKs. Here is a short walkthrough guide on how to do that: https://docs.statsig.com/guides/experiment-on-custom-id-types
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 7:50 AM
This is how our client SDK is adding stableID today
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 7:49 AM
We should enable an easier to do this, but for now a workaround is to add a `stableID` to `statsigMetadata` object in each event. Example curl command ```curl \ --header "statsig-api-key: <API-KEY>" \ --header "Content-Type: application/json" \ --request POST \ --data '{"events": [{"user": { "userID": "42", "statsigEnvironment": {"tier": "production"} }, "time": 1616826986211, "eventName": "test_api_event", "statsigMetadata": {"stableID": "123"}}]}' \ "https://api.statsig.com/v1/log_event"```
Vijaye (Statsig)
Wednesday, January 5, 2022, 7:40 AM
Events are super lightweight - it's better to log more than less. So in your case where you have a metadata to differentiate, is it possible for you to log two different events?
Vijaye (Statsig)
Wednesday, January 5, 2022, 7:39 AM
Correct, anything you log explicitly with statsig.logEvent will be considered as part of the metrics.
Daiki Takaya
Wednesday, January 5, 2022, 7:29 AM
Sure. Thank you!
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 7:28 AM
cool, there should be a couple ways, let me double check to confirm first
Bas Nguyen
Wednesday, January 5, 2022, 7:27 AM
so statsig metrics take all events or nothing, there are no ways to tell the metrics to only include certain events, or even using segments to filter out unwanted events
Daiki Takaya
Wednesday, January 5, 2022, 7:27 AM
Yes, that’s right.
Bas Nguyen
Wednesday, January 5, 2022, 7:24 AM
yep, we have some metadata to do so
Jiakan Wang (Statsig)
Wednesday, January 5, 2022, 7:22 AM
Oh I see - are you using stableID in client SDKs already, and want to use the same IDs for your backend, which is using our HTTP APIs?

We use cookies to ensure you get the best experience on our website.

Privacy Policy