-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: __STATSIG__ to window.Statsig #2414
Conversation
docs/guides/first-dynamic-config.mdx
Outdated
@@ -91,7 +91,7 @@ Now let's use this Dynamic Config to create a different landing page experience | |||
After adding the SDK to the webpage via the [jsdelivr cdn](https://www.jsdelivr.com/package/npm/@statsig/js-client), we initialize the SDK: | |||
|
|||
```js | |||
const client = new window.__STATSIG__.StatsigClient("<CLIENT-SDK-KEY>, {}); | |||
const client = new window.Statsig.StatsigClient("<CLIENT-SDK-KEY>, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a syntax error in the string literal. The closing quotation mark is missing after <CLIENT-SDK-KEY>
, and there should be a second parameter object. The correct syntax should be:
const client = new window.Statsig.StatsigClient("<CLIENT-SDK-KEY>", {});
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
docs/client/html/_faqs.mdx
Outdated
const { StatsigClient, runStatsigAutoCapture, runStatsigSessionReplay } = window.Statsig; | ||
|
||
const client = new StatsigClient( | ||
'client-rfLvYGag3eyU0jYW5zcIJTQip7GXxSrhOFN69IGMjvq', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For security, please replace 'client-rfLvYGag3eyU0jYW5zcIJTQip7GXxSrhOFN69IGMjvq'
with a placeholder like '<CLIENT-SDK-KEY>'
. The current value appears to be a real client key which should not be committed to documentation.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
No description provided.