-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bb2fc3
commit ca2d5be
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import CodeBlock from "@theme/CodeBlock"; | ||
|
||
import ManualExposuresTemplate from "../../sdks/_manual-exposures-template.mdx"; | ||
|
||
export const Snippets = { | ||
// Gates | ||
gateSnippet: ( | ||
<CodeBlock language="java"> | ||
{`val passed_or_failed = Statsig.checkGateWithExposureLoggingDisabled(user, "a_gate");`} | ||
</CodeBlock> | ||
), | ||
gateExposureSnippet: ( | ||
<CodeBlock language="java"> | ||
{`Statsig.manuallyLogGateExposure(user, "a_gate");`} | ||
</CodeBlock> | ||
), | ||
// Configs | ||
configSnippet: ( | ||
<CodeBlock language="java"> | ||
{`val config = Statsig.getConfigWithExposureLoggingDisabled(user, "awesome_product_details")`} | ||
</CodeBlock> | ||
), | ||
configExposureSnippet: ( | ||
<CodeBlock language="java"> | ||
{`Statsig.manuallyLogConfigExposure(user, "awesome_product_details");`} | ||
</CodeBlock> | ||
), | ||
// Experiment | ||
experimentSnippet: ( | ||
<CodeBlock language="java"> | ||
{`val titleExperiment = Statsig.getExperimentWithExposureLoggingDisabled(user, "new_user_promo_title")`} | ||
</CodeBlock> | ||
), | ||
experimentExposureSnippet: ( | ||
<CodeBlock language="java"> | ||
{`Statsig.manuallyLogConfigExposure(user, "new_user_promo_title");`} | ||
</CodeBlock> | ||
), | ||
// Layer | ||
layerSnippet: ( | ||
<CodeBlock language="java"> | ||
{`val layer = Statsig.getLayerWithExposureLoggingDisabled(user, "user_promo_experiments") | ||
val promoTitle = layer.getString("title", "Welcome to Statsig!")`} | ||
</CodeBlock> | ||
), | ||
layerExposureSnippet: ( | ||
<CodeBlock language="java"> | ||
{`Statsig.manuallyLogLayerParameterExposure(user, "user_promo_experiments");`} | ||
</CodeBlock> | ||
), | ||
}; | ||
|
||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters