vybekiit 0.7.26 → 0.7.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +3891 -1301
- package/dist/global-skills/aws-cdk/SKILL.md +19 -5
- package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
- package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
- package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
- package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
- package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
- package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
- package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
- package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
- package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
- package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
- package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
- package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
- package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
- package/dist/global-skills/aws-serverless/SKILL.md +9 -1
- package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
- package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
- package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
- package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
- package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
- package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
- package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
- package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
- package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
- package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
- package/dist/global-skills/eas-simulator/SKILL.md +48 -26
- package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
- package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
- package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
- package/dist/global-skills/eas-update/SKILL.md +146 -0
- package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-animation/RECIPES.md +2 -2
- package/dist/global-skills/expo-animation/SKILL.md +9 -2
- package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
- package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
- package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
- package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
- package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
- package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
- package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
- package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
- package/dist/global-skills/expo-design-system/SKILL.md +27 -7
- package/dist/global-skills/expo-design-system/references/audit.md +7 -2
- package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
- package/dist/global-skills/expo-examples/SKILL.md +0 -1
- package/dist/global-skills/expo-examples/references/catalog.md +1 -1
- package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
- package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
- package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
- package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
- package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
- package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
- package/dist/global-skills/expo-native-ui/references/media.md +15 -20
- package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
- package/dist/global-skills/expo-overview/SKILL.md +17 -12
- package/dist/global-skills/expo-router/SKILL.md +5 -3
- package/dist/global-skills/expo-router/references/tabs.md +5 -5
- package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
- package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
- package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
- package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
- package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
- package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
- package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
- package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
- package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
- package/dist/global-skills/firebase-data-connect/examples.md +4 -4
- package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
- package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
- package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
- package/dist/global-skills/firebase-data-connect/templates.md +2 -1
- package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
- package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
- package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
- package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
- package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
- package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
- package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
- package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
- package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
- package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
- package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
- package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
- package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
- package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
- package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
- package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
- package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
- package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
- package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
- package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
- package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
- package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
- package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
- package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
- package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
- package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
- package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
- package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
- package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
- package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
- package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
- package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
- package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
- package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
- package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
- package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
- package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
- package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
- package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
- package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
- package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
- package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
- package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
- package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
- package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
- package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
- package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
- package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
- package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
- package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
- package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
- package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
- package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
- package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
- package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
- package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
- package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
- package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
- package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
- package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
- package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
- package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
- package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
- package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
- package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
- package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
- package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
- package/dist/global-skills/manifest.json +8 -2
- package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
- package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
- package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
- package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
- package/dist/global-skills/neon/SKILL.md +207 -213
- package/dist/global-skills/neon/references/auth.md +12 -0
- package/dist/global-skills/neon/references/claimable-neon.md +10 -14
- package/dist/global-skills/neon/references/function-triggers.md +53 -0
- package/dist/global-skills/neon/references/logs-loki.md +61 -0
- package/dist/global-skills/neon/references/parse-env.md +32 -0
- package/dist/global-skills/neon/references/sdk.md +7 -0
- package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
- package/dist/global-skills/neon-auth/SKILL.md +155 -0
- package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
- package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
- package/dist/global-skills/neon-functions/SKILL.md +159 -84
- package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
- package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
- package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
- package/dist/global-skills/neon-functions/references/mcp.md +1 -1
- package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
- package/dist/global-skills/neon-functions/references/sse.md +8 -5
- package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
- package/dist/global-skills/neon-postgres/SKILL.md +120 -17
- package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
- package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
- package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
- package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
- package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
- package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
- package/dist/global-skills/onboarding/SKILL.md +8 -6
- package/dist/global-skills/resend/SKILL.md +4 -2
- package/dist/global-skills/resend/references/broadcasts.md +6 -1
- package/dist/global-skills/resend/references/receiving.md +29 -10
- package/dist/global-skills/resend/references/sending/email-management.md +14 -4
- package/dist/global-skills/resend/references/topics.md +9 -6
- package/dist/global-skills/resend/references/usage.md +117 -0
- package/dist/global-skills/resend/references/webhooks.md +59 -2
- package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
- package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
- package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
- package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
- package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
- package/dist/global-skills/supabase/SKILL.md +6 -0
- package/dist/global-skills/use-railway/SKILL.md +42 -22
- package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
- package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
- package/dist/global-skills/use-railway/references/configure.md +17 -2
- package/dist/global-skills/use-railway/references/databases.md +107 -0
- package/dist/global-skills/use-railway/references/deploy.md +5 -5
- package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
- package/dist/global-skills/use-railway/references/iac.md +66 -77
- package/dist/global-skills/use-railway/references/operate.md +26 -3
- package/dist/global-skills/use-railway/references/request.md +31 -23
- package/dist/global-skills/use-railway/references/setup.md +16 -5
- package/dist/global-skills/use-railway/references/tracing.md +261 -0
- package/dist/global-skills/use-railway/references/usage.md +52 -0
- package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
- package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
- package/dist/global-skills/watch-my-app/SKILL.md +53 -0
- package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
- package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
- package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
- package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
- package/dist/global-skills/wrangler/SKILL.md +48 -901
- package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
- package/package.json +9 -8
- package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
- package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
- package/dist/global-skills/workers-best-practices/references/review.md +0 -174
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
|
|
2
2
|
|
|
3
|
-
# .NET
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# .NET - Docs
|
|
3
|
+
# .NET
|
|
8
4
|
|
|
9
5
|
This is an optional library you can install if you're working with .NET Core. It uses an internal queue to make calls fast and non-blocking. It also batches requests and flushes asynchronously, making it perfect to use in any part of your web app or other server side application that needs performance.
|
|
10
6
|
|
|
@@ -18,8 +14,6 @@ The `PostHog` package supports any .NET platform that targets .NET Standard 2.1
|
|
|
18
14
|
|
|
19
15
|
Terminal
|
|
20
16
|
|
|
21
|
-
PostHog AI
|
|
22
|
-
|
|
23
17
|
```bash
|
|
24
18
|
dotnet add package PostHog.AspNetCore
|
|
25
19
|
```
|
|
@@ -28,11 +22,11 @@ In your `Program.cs` (or `Startup.cs` for ASP.NET Core 2.x) file, add the follow
|
|
|
28
22
|
|
|
29
23
|
C#
|
|
30
24
|
|
|
31
|
-
PostHog AI
|
|
32
|
-
|
|
33
25
|
```csharp
|
|
34
26
|
using PostHog;
|
|
27
|
+
|
|
35
28
|
var builder = WebApplication.CreateBuilder(args);
|
|
29
|
+
|
|
36
30
|
// Add PostHog to the dependency injection container as a singleton.
|
|
37
31
|
builder.AddPostHog();
|
|
38
32
|
```
|
|
@@ -41,8 +35,6 @@ Make sure to configure PostHog with your project token, instance address, and op
|
|
|
41
35
|
|
|
42
36
|
JSON
|
|
43
37
|
|
|
44
|
-
PostHog AI
|
|
45
|
-
|
|
46
38
|
```json
|
|
47
39
|
{
|
|
48
40
|
"PostHog": {
|
|
@@ -58,8 +50,6 @@ Use a secrets manager to store your personal API key. For example, when developi
|
|
|
58
50
|
|
|
59
51
|
Terminal
|
|
60
52
|
|
|
61
|
-
PostHog AI
|
|
62
|
-
|
|
63
53
|
```bash
|
|
64
54
|
dotnet user-secrets init
|
|
65
55
|
dotnet user-secrets set "PostHog:PersonalApiKey" "phx_..."
|
|
@@ -75,14 +65,13 @@ To use feature flags with the .NET Feature Management library, you'll need to im
|
|
|
75
65
|
|
|
76
66
|
C#
|
|
77
67
|
|
|
78
|
-
PostHog AI
|
|
79
|
-
|
|
80
68
|
```csharp
|
|
81
69
|
public class MyFeatureFlagContextProvider(IHttpContextAccessor httpContextAccessor)
|
|
82
70
|
: PostHogFeatureFlagContextProvider
|
|
83
71
|
{
|
|
84
72
|
protected override string? GetDistinctId()
|
|
85
73
|
=> httpContextAccessor.HttpContext?.User.Identity?.Name;
|
|
74
|
+
|
|
86
75
|
protected override ValueTask<FeatureFlagOptions> GetFeatureFlagOptionsAsync()
|
|
87
76
|
{
|
|
88
77
|
// In a real app, you might get this information from a
|
|
@@ -104,8 +93,6 @@ Then, register your implementation in `Program.cs` (or `Startup.cs`):
|
|
|
104
93
|
|
|
105
94
|
C#
|
|
106
95
|
|
|
107
|
-
PostHog AI
|
|
108
|
-
|
|
109
96
|
```csharp
|
|
110
97
|
var builder = WebApplication.CreateBuilder(args);
|
|
111
98
|
builder.AddPostHog(options => {
|
|
@@ -117,8 +104,6 @@ With this in place, you can now use `feature` tag helpers in your Razor views:
|
|
|
117
104
|
|
|
118
105
|
HTML
|
|
119
106
|
|
|
120
|
-
PostHog AI
|
|
121
|
-
|
|
122
107
|
```html
|
|
123
108
|
<feature name="awesome-new-feature">
|
|
124
109
|
<p>This is the new feature!</p>
|
|
@@ -132,8 +117,6 @@ Multivariate feature flags are also supported:
|
|
|
132
117
|
|
|
133
118
|
HTML
|
|
134
119
|
|
|
135
|
-
PostHog AI
|
|
136
|
-
|
|
137
120
|
```html
|
|
138
121
|
<feature name="awesome-new-feature" value="variant-a">
|
|
139
122
|
<p>This is the new feature variant A!</p>
|
|
@@ -147,8 +130,6 @@ You can also use the `FeatureGateAttribute` to gate access to controllers or act
|
|
|
147
130
|
|
|
148
131
|
C#
|
|
149
132
|
|
|
150
|
-
PostHog AI
|
|
151
|
-
|
|
152
133
|
```csharp
|
|
153
134
|
[FeatureGate("awesome-new-feature")]
|
|
154
135
|
public class NewFeatureController : Controller
|
|
@@ -166,8 +147,6 @@ If you're not using ASP.NET Core (for example, in a console application, MAUI ap
|
|
|
166
147
|
|
|
167
148
|
Terminal
|
|
168
149
|
|
|
169
|
-
PostHog AI
|
|
170
|
-
|
|
171
150
|
```bash
|
|
172
151
|
dotnet add package PostHog
|
|
173
152
|
```
|
|
@@ -176,8 +155,6 @@ The `PostHogClient` class must be implemented as a singleton in your project. Fo
|
|
|
176
155
|
|
|
177
156
|
C#
|
|
178
157
|
|
|
179
|
-
PostHog AI
|
|
180
|
-
|
|
181
158
|
```csharp
|
|
182
159
|
builder.Services.AddPostHog();
|
|
183
160
|
```
|
|
@@ -186,10 +163,9 @@ If you're not using a `builder` (such as in a console application), you can do t
|
|
|
186
163
|
|
|
187
164
|
C#
|
|
188
165
|
|
|
189
|
-
PostHog AI
|
|
190
|
-
|
|
191
166
|
```csharp
|
|
192
167
|
using PostHog;
|
|
168
|
+
|
|
193
169
|
var services = new ServiceCollection();
|
|
194
170
|
services.AddPostHog();
|
|
195
171
|
var serviceProvider = services.BuildServiceProvider();
|
|
@@ -202,10 +178,9 @@ If you're not using dependency injection, you can create a static instance of th
|
|
|
202
178
|
|
|
203
179
|
C#
|
|
204
180
|
|
|
205
|
-
PostHog AI
|
|
206
|
-
|
|
207
181
|
```csharp
|
|
208
182
|
using PostHog;
|
|
183
|
+
|
|
209
184
|
public static readonly PostHogClient PostHog = new(new PostHogOptions {
|
|
210
185
|
ProjectToken = "<ph_project_token>",
|
|
211
186
|
HostUrl = new Uri("https://us.i.posthog.com"),
|
|
@@ -222,8 +197,6 @@ To see detailed logging, set the log level to `Debug` or `Trace` in `appsettings
|
|
|
222
197
|
|
|
223
198
|
JSON
|
|
224
199
|
|
|
225
|
-
PostHog AI
|
|
226
|
-
|
|
227
200
|
```json
|
|
228
201
|
{
|
|
229
202
|
"DetailedErrors": true,
|
|
@@ -250,8 +223,6 @@ You can send custom events using `capture`:
|
|
|
250
223
|
|
|
251
224
|
C#
|
|
252
225
|
|
|
253
|
-
PostHog AI
|
|
254
|
-
|
|
255
226
|
```csharp
|
|
256
227
|
posthog.Capture("distinct_id_of_the_user", "user_signed_up");
|
|
257
228
|
```
|
|
@@ -264,8 +235,6 @@ Optionally, you can include additional information with the event by including a
|
|
|
264
235
|
|
|
265
236
|
C#
|
|
266
237
|
|
|
267
|
-
PostHog AI
|
|
268
|
-
|
|
269
238
|
```csharp
|
|
270
239
|
posthog.Capture(
|
|
271
240
|
"distinct_id_of_the_user",
|
|
@@ -283,11 +252,10 @@ If you're aiming for a backend-only implementation of PostHog and won't be captu
|
|
|
283
252
|
|
|
284
253
|
C#
|
|
285
254
|
|
|
286
|
-
PostHog AI
|
|
287
|
-
|
|
288
255
|
```csharp
|
|
289
256
|
using PostHog;
|
|
290
257
|
using Microsoft.AspNetCore.Http.Extensions;
|
|
258
|
+
|
|
291
259
|
posthog.CapturePageView(
|
|
292
260
|
"distinct_id_of_the_user",
|
|
293
261
|
HttpContext.Request.GetDisplayUrl());
|
|
@@ -299,14 +267,15 @@ For ASP.NET Core apps using `PostHog.AspNetCore`, add request context middleware
|
|
|
299
267
|
|
|
300
268
|
Program.cs
|
|
301
269
|
|
|
302
|
-
PostHog AI
|
|
303
|
-
|
|
304
270
|
```csharp
|
|
305
271
|
using PostHog;
|
|
306
272
|
using PostHog.AspNetCore;
|
|
273
|
+
|
|
307
274
|
var builder = WebApplication.CreateBuilder(args);
|
|
308
275
|
builder.AddPostHog();
|
|
276
|
+
|
|
309
277
|
var app = builder.Build();
|
|
278
|
+
|
|
310
279
|
app.UsePostHogRequestContext();
|
|
311
280
|
```
|
|
312
281
|
|
|
@@ -318,8 +287,6 @@ Tracing headers are client-controlled analytics context, not authentication or a
|
|
|
318
287
|
|
|
319
288
|
C#
|
|
320
289
|
|
|
321
|
-
PostHog AI
|
|
322
|
-
|
|
323
290
|
```csharp
|
|
324
291
|
app.UsePostHogRequestContext(options =>
|
|
325
292
|
{
|
|
@@ -337,8 +304,6 @@ File names, line numbers, and source context depend on debug information already
|
|
|
337
304
|
|
|
338
305
|
C#
|
|
339
306
|
|
|
340
|
-
PostHog AI
|
|
341
|
-
|
|
342
307
|
```csharp
|
|
343
308
|
try
|
|
344
309
|
{
|
|
@@ -354,8 +319,6 @@ Add custom properties to include request, tenant, or domain context:
|
|
|
354
319
|
|
|
355
320
|
C#
|
|
356
321
|
|
|
357
|
-
PostHog AI
|
|
358
|
-
|
|
359
322
|
```csharp
|
|
360
323
|
posthog.CaptureException(
|
|
361
324
|
exception,
|
|
@@ -378,12 +341,10 @@ Automatic exception capture is not available in the .NET SDK yet.
|
|
|
378
341
|
|
|
379
342
|
## Person profiles and properties
|
|
380
343
|
|
|
381
|
-
The .NET SDK captures identified events by default. These create [person profiles](/docs/data/persons.md). To set [person properties](/docs/
|
|
344
|
+
The .NET SDK captures identified events by default. These create [person profiles](/docs/data/persons.md). To set [person properties](/docs/product-analytics/person-properties.md) in these profiles, include them when capturing an event:
|
|
382
345
|
|
|
383
346
|
C#
|
|
384
347
|
|
|
385
|
-
PostHog AI
|
|
386
|
-
|
|
387
348
|
```csharp
|
|
388
349
|
posthog.Capture(
|
|
389
350
|
"distinct_id",
|
|
@@ -393,14 +354,12 @@ posthog.Capture(
|
|
|
393
354
|
);
|
|
394
355
|
```
|
|
395
356
|
|
|
396
|
-
For more details on the difference between `$set` and `$set_once`, see our [person properties docs](/docs/
|
|
357
|
+
For more details on the difference between `$set` and `$set_once`, see our [person properties docs](/docs/product-analytics/person-properties.md#what-is-the-difference-between-set-and-set_once).
|
|
397
358
|
|
|
398
359
|
To capture [anonymous events](/docs/data/anonymous-vs-identified-events.md) without person profiles, set the event's `$process_person_profile` property to `false`:
|
|
399
360
|
|
|
400
361
|
C#
|
|
401
362
|
|
|
402
|
-
PostHog AI
|
|
403
|
-
|
|
404
363
|
```csharp
|
|
405
364
|
posthog.Capture(
|
|
406
365
|
"distinct_id",
|
|
@@ -419,8 +378,6 @@ In this case, you can use `alias` to assign another distinct ID to the same user
|
|
|
419
378
|
|
|
420
379
|
C#
|
|
421
380
|
|
|
422
|
-
PostHog AI
|
|
423
|
-
|
|
424
381
|
```csharp
|
|
425
382
|
await posthog.AliasAsync("current_distinct_id", "new_distinct_id");
|
|
426
383
|
```
|
|
@@ -437,8 +394,6 @@ To capture an event and associate it with a group, add the `groups` argument to
|
|
|
437
394
|
|
|
438
395
|
C#
|
|
439
396
|
|
|
440
|
-
PostHog AI
|
|
441
|
-
|
|
442
397
|
```csharp
|
|
443
398
|
posthog.Capture(
|
|
444
399
|
"user_distinct_id",
|
|
@@ -450,8 +405,6 @@ Update properties on a group, use the `GroupIdentifyAsync` method:
|
|
|
450
405
|
|
|
451
406
|
C#
|
|
452
407
|
|
|
453
|
-
PostHog AI
|
|
454
|
-
|
|
455
408
|
```csharp
|
|
456
409
|
await posthog.GroupIdentifyAsync(
|
|
457
410
|
type: "company",
|
|
@@ -480,10 +433,9 @@ Call `EvaluateFlagsAsync()` once for the user, then read values from the returne
|
|
|
480
433
|
|
|
481
434
|
C#
|
|
482
435
|
|
|
483
|
-
PostHog AI
|
|
484
|
-
|
|
485
436
|
```csharp
|
|
486
437
|
var flags = await posthog.EvaluateFlagsAsync("distinct_id_of_your_user");
|
|
438
|
+
|
|
487
439
|
if (flags.IsEnabled("flag-key"))
|
|
488
440
|
{
|
|
489
441
|
// Do something differently for this user
|
|
@@ -496,11 +448,11 @@ if (flags.IsEnabled("flag-key"))
|
|
|
496
448
|
|
|
497
449
|
C#
|
|
498
450
|
|
|
499
|
-
PostHog AI
|
|
500
|
-
|
|
501
451
|
```csharp
|
|
502
452
|
var flags = await posthog.EvaluateFlagsAsync("distinct_id_of_your_user");
|
|
453
|
+
|
|
503
454
|
var enabledVariant = flags.GetFlag("flag-key")?.VariantKey;
|
|
455
|
+
|
|
504
456
|
if (enabledVariant == "variant-key") // replace "variant-key" with the key of your variant
|
|
505
457
|
{
|
|
506
458
|
// Do something differently for this user
|
|
@@ -527,14 +479,14 @@ Pass the same `flags` object that you used for branching. This attaches the exac
|
|
|
527
479
|
|
|
528
480
|
C#
|
|
529
481
|
|
|
530
|
-
PostHog AI
|
|
531
|
-
|
|
532
482
|
```csharp
|
|
533
483
|
var flags = await posthog.EvaluateFlagsAsync("distinct_id_of_your_user");
|
|
484
|
+
|
|
534
485
|
if (flags.IsEnabled("flag-key"))
|
|
535
486
|
{
|
|
536
487
|
// Do something differently for this user
|
|
537
488
|
}
|
|
489
|
+
|
|
538
490
|
posthog.Capture(
|
|
539
491
|
"distinct_id_of_your_user",
|
|
540
492
|
"event_name",
|
|
@@ -550,8 +502,6 @@ To reduce event property bloat, pass a filtered snapshot:
|
|
|
550
502
|
|
|
551
503
|
C#
|
|
552
504
|
|
|
553
|
-
PostHog AI
|
|
554
|
-
|
|
555
505
|
```csharp
|
|
556
506
|
// Attach only flags accessed with IsEnabled() or GetFlag() before this call
|
|
557
507
|
posthog.Capture(
|
|
@@ -561,6 +511,7 @@ posthog.Capture(
|
|
|
561
511
|
groups: null,
|
|
562
512
|
flags: flags.OnlyAccessed()
|
|
563
513
|
);
|
|
514
|
+
|
|
564
515
|
// Attach only specific flags
|
|
565
516
|
posthog.Capture(
|
|
566
517
|
"distinct_id_of_your_user",
|
|
@@ -577,8 +528,6 @@ In the event properties, include `$feature/feature_flag_name: variant_key`:
|
|
|
577
528
|
|
|
578
529
|
C#
|
|
579
530
|
|
|
580
|
-
PostHog AI
|
|
581
|
-
|
|
582
531
|
```csharp
|
|
583
532
|
posthog.Capture(
|
|
584
533
|
"distinct_id_of_your_user",
|
|
@@ -597,8 +546,6 @@ By default, `EvaluateFlagsAsync()` evaluates every flag for the user. If you onl
|
|
|
597
546
|
|
|
598
547
|
C#
|
|
599
548
|
|
|
600
|
-
PostHog AI
|
|
601
|
-
|
|
602
549
|
```csharp
|
|
603
550
|
var flags = await posthog.EvaluateFlagsAsync(
|
|
604
551
|
"distinct_id_of_your_user",
|
|
@@ -627,8 +574,6 @@ For example:
|
|
|
627
574
|
|
|
628
575
|
C#
|
|
629
576
|
|
|
630
|
-
PostHog AI
|
|
631
|
-
|
|
632
577
|
```csharp
|
|
633
578
|
var flags = await posthog.EvaluateFlagsAsync(
|
|
634
579
|
"distinct_id_of_the_user",
|
|
@@ -651,6 +596,7 @@ var flags = await posthog.EvaluateFlagsAsync(
|
|
|
651
596
|
},
|
|
652
597
|
}
|
|
653
598
|
);
|
|
599
|
+
|
|
654
600
|
if (flags.IsEnabled("flag-key"))
|
|
655
601
|
{
|
|
656
602
|
// Do something differently for this user
|
|
@@ -690,8 +636,6 @@ Configure evaluation contexts so this SDK only evaluates flags intended for the
|
|
|
690
636
|
|
|
691
637
|
JSON
|
|
692
638
|
|
|
693
|
-
PostHog AI
|
|
694
|
-
|
|
695
639
|
```json
|
|
696
640
|
{
|
|
697
641
|
"PostHog": {
|
|
@@ -706,8 +650,6 @@ For code-based configuration, set `EvaluationContexts` on `PostHogOptions`:
|
|
|
706
650
|
|
|
707
651
|
C#
|
|
708
652
|
|
|
709
|
-
PostHog AI
|
|
710
|
-
|
|
711
653
|
```csharp
|
|
712
654
|
var posthog = new PostHogClient(new PostHogOptions
|
|
713
655
|
{
|
|
@@ -735,11 +677,10 @@ Since [experiments](/docs/experiments/start-here.md) use feature flags, the code
|
|
|
735
677
|
|
|
736
678
|
C#
|
|
737
679
|
|
|
738
|
-
PostHog AI
|
|
739
|
-
|
|
740
680
|
```csharp
|
|
741
681
|
var flags = await posthog.EvaluateFlagsAsync("user_distinct_id");
|
|
742
682
|
var variant = flags.GetFlag("experiment-feature-flag-key")?.VariantKey;
|
|
683
|
+
|
|
743
684
|
if (variant == "variant-name")
|
|
744
685
|
{
|
|
745
686
|
// Do something
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
|
|
2
2
|
|
|
3
|
-
# Elixir Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Elixir Feature Flags installation - Docs
|
|
3
|
+
# Elixir Feature Flags installation
|
|
8
4
|
|
|
9
5
|
> This library was built by the community but it's being maintained by the PostHog core team since v1.0.0. Thank you to [Nick Kezhaya](https://github.com/nkezhaya) for building it originally. Thank you to [Alex Martsinovich](https://github.com/martosaur) for contributing v2.0.0.
|
|
10
6
|
|
|
@@ -12,8 +8,6 @@ The package can be installed by adding `posthog` to your list of dependencies in
|
|
|
12
8
|
|
|
13
9
|
Elixir
|
|
14
10
|
|
|
15
|
-
PostHog AI
|
|
16
|
-
|
|
17
11
|
```elixir
|
|
18
12
|
def deps do
|
|
19
13
|
[
|
|
@@ -26,8 +20,6 @@ end
|
|
|
26
20
|
|
|
27
21
|
config/config.exs
|
|
28
22
|
|
|
29
|
-
PostHog AI
|
|
30
|
-
|
|
31
23
|
```elixir
|
|
32
24
|
config :posthog,
|
|
33
25
|
enable: true,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
|
|
2
2
|
|
|
3
|
-
# Flask
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Flask - Docs
|
|
3
|
+
# Flask
|
|
8
4
|
|
|
9
5
|
PostHog makes it easy to get data about traffic and usage of your Flask app. Integrating PostHog enables analytics, custom events capture, feature flags, error tracking, and more.
|
|
10
6
|
|
|
@@ -20,16 +16,17 @@ Then, initialize PostHog where you'd like to use it. For example, here's how to
|
|
|
20
16
|
|
|
21
17
|
app.py
|
|
22
18
|
|
|
23
|
-
PostHog AI
|
|
24
|
-
|
|
25
19
|
```python
|
|
26
20
|
from flask import Flask
|
|
27
21
|
from posthog import Posthog
|
|
22
|
+
|
|
28
23
|
app = Flask(__name__)
|
|
24
|
+
|
|
29
25
|
posthog = Posthog(
|
|
30
26
|
'<ph_project_token>',
|
|
31
27
|
host='https://us.i.posthog.com',
|
|
32
28
|
)
|
|
29
|
+
|
|
33
30
|
@app.route('/api/dashboard', methods=['POST'])
|
|
34
31
|
def api_dashboard():
|
|
35
32
|
posthog.capture(
|
|
@@ -49,10 +46,9 @@ You can find your project token and instance address in [your project settings](
|
|
|
49
46
|
>
|
|
50
47
|
> Python
|
|
51
48
|
>
|
|
52
|
-
> PostHog AI
|
|
53
|
-
>
|
|
54
49
|
> ```python
|
|
55
50
|
> from posthog import new_context, identify_context, capture
|
|
51
|
+
>
|
|
56
52
|
> @app.get("/foo")
|
|
57
53
|
> def foo(current_user: User = Depends(get_current_user)):
|
|
58
54
|
> with new_context(): # Set context at the top of a route
|
|
@@ -73,24 +69,27 @@ Then read the incoming headers in your Flask request handler. Tracing headers ar
|
|
|
73
69
|
|
|
74
70
|
Python
|
|
75
71
|
|
|
76
|
-
PostHog AI
|
|
77
|
-
|
|
78
72
|
```python
|
|
79
73
|
from flask import request, session
|
|
80
74
|
from posthog import identify_context, set_context_session, tag
|
|
75
|
+
|
|
81
76
|
@app.route('/api/dashboard', methods=['POST'])
|
|
82
77
|
def api_dashboard():
|
|
83
78
|
with posthog.new_context(fresh=True):
|
|
84
79
|
distinct_id = session.get('user_id') or request.headers.get('X-POSTHOG-DISTINCT-ID')
|
|
85
80
|
if distinct_id:
|
|
86
81
|
identify_context(str(distinct_id))
|
|
82
|
+
|
|
87
83
|
session_id = request.headers.get('X-POSTHOG-SESSION-ID')
|
|
88
84
|
if session_id:
|
|
89
85
|
set_context_session(session_id)
|
|
86
|
+
|
|
90
87
|
tag('$current_url', request.url)
|
|
91
88
|
tag('$request_method', request.method)
|
|
92
89
|
tag('$request_path', request.path)
|
|
90
|
+
|
|
93
91
|
posthog.capture('dashboard_api_called')
|
|
92
|
+
|
|
94
93
|
return '', 204
|
|
95
94
|
```
|
|
96
95
|
|
|
@@ -102,18 +101,19 @@ Flask has built-in error handlers. This means PostHog’s default exception auto
|
|
|
102
101
|
|
|
103
102
|
Python
|
|
104
103
|
|
|
105
|
-
PostHog AI
|
|
106
|
-
|
|
107
104
|
```python
|
|
108
105
|
from flask import Flask, jsonify
|
|
109
106
|
from posthog import Posthog
|
|
107
|
+
|
|
110
108
|
app = Flask(__name__)
|
|
111
109
|
posthog = Posthog('<ph_project_token>', host='https://us.i.posthog.com')
|
|
110
|
+
|
|
112
111
|
@app.errorhandler(Exception)
|
|
113
112
|
def handle_exception(e):
|
|
114
113
|
# Capture methods, including capture_exception, return the UUID of the captured event,
|
|
115
114
|
# which you can use to find specific errors users encountered
|
|
116
115
|
event_id = posthog.capture_exception(e)
|
|
116
|
+
|
|
117
117
|
# You can show the event ID to your user, and ask them to include it in bug reports
|
|
118
118
|
response = jsonify({'message': str(e), 'error_id': event_id})
|
|
119
119
|
response.status_code = 500
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
|
|
2
2
|
|
|
3
|
-
# Flutter Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Flutter Feature Flags installation - Docs
|
|
3
|
+
# Flutter Feature Flags installation
|
|
8
4
|
|
|
9
5
|
1. 1
|
|
10
6
|
|
|
@@ -16,8 +12,6 @@ Copy page
|
|
|
16
12
|
|
|
17
13
|
pubspec.yaml
|
|
18
14
|
|
|
19
|
-
PostHog AI
|
|
20
|
-
|
|
21
15
|
```yaml
|
|
22
16
|
posthog_flutter: ^5.24.0
|
|
23
17
|
```
|
|
@@ -34,8 +28,6 @@ Copy page
|
|
|
34
28
|
|
|
35
29
|
android/app/src/main/AndroidManifest.xml
|
|
36
30
|
|
|
37
|
-
PostHog AI
|
|
38
|
-
|
|
39
31
|
```xml
|
|
40
32
|
<application>
|
|
41
33
|
<activity>
|
|
@@ -52,8 +44,6 @@ Copy page
|
|
|
52
44
|
|
|
53
45
|
android/app/build.gradle
|
|
54
46
|
|
|
55
|
-
PostHog AI
|
|
56
|
-
|
|
57
47
|
```groovy
|
|
58
48
|
defaultConfig {
|
|
59
49
|
minSdkVersion 23
|
|
@@ -67,8 +57,6 @@ Copy page
|
|
|
67
57
|
|
|
68
58
|
ios/Runner/Info.plist
|
|
69
59
|
|
|
70
|
-
PostHog AI
|
|
71
|
-
|
|
72
60
|
```xml
|
|
73
61
|
<dict>
|
|
74
62
|
[...]
|
|
@@ -87,8 +75,6 @@ Copy page
|
|
|
87
75
|
|
|
88
76
|
Podfile
|
|
89
77
|
|
|
90
|
-
PostHog AI
|
|
91
|
-
|
|
92
78
|
```ruby
|
|
93
79
|
platform :ios, '13.0'
|
|
94
80
|
# rest of your config
|
|
@@ -100,15 +86,13 @@ Copy page
|
|
|
100
86
|
|
|
101
87
|
web/index.html
|
|
102
88
|
|
|
103
|
-
PostHog AI
|
|
104
|
-
|
|
105
89
|
```html
|
|
106
90
|
<!DOCTYPE html>
|
|
107
91
|
<html>
|
|
108
92
|
<head>
|
|
109
93
|
...
|
|
110
94
|
<script>
|
|
111
|
-
!function(t,e){var o,n,p,r;e.__SV||(window.posthog && window.posthog.__loaded)||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}p||((p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",p.onerror=function(){p=null},(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r));var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u
|
|
95
|
+
!function(t,e){var o,n,p,r;e.__SV||(window.posthog && window.posthog.__loaded)||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}p||((p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",p.onerror=function(){p=null},(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r));var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],Object.defineProperty(u,"toString",{configurable:!0,enumerable:!0,writable:!0,value:function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e}}),Object.defineProperty(u.people,"toString",{configurable:!0,enumerable:!0,writable:!0,value:function(){return u.toString(1)+".people (stub)"}}),o="init capture register register_once register_for_session unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group identify setPersonProperties setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags resetGroups onFeatureFlags addFeatureFlagsHandler onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
|
112
96
|
posthog.init('<ph_project_token>', {
|
|
113
97
|
api_host: 'https://us.i.posthog.com',
|
|
114
98
|
defaults: '2026-05-30',
|
|
@@ -131,10 +115,9 @@ Copy page
|
|
|
131
115
|
|
|
132
116
|
Dart
|
|
133
117
|
|
|
134
|
-
PostHog AI
|
|
135
|
-
|
|
136
118
|
```dart
|
|
137
119
|
import 'package:posthog_flutter/posthog_flutter.dart';
|
|
120
|
+
|
|
138
121
|
await Posthog().capture(
|
|
139
122
|
eventName: 'button_clicked',
|
|
140
123
|
properties: {
|
|
@@ -153,8 +136,6 @@ Copy page
|
|
|
153
136
|
|
|
154
137
|
Dart
|
|
155
138
|
|
|
156
|
-
PostHog AI
|
|
157
|
-
|
|
158
139
|
```dart
|
|
159
140
|
final isMyFlagEnabled = await Posthog().isFeatureEnabled('flag-key');
|
|
160
141
|
if (isMyFlagEnabled) {
|
|
@@ -174,8 +155,6 @@ Copy page
|
|
|
174
155
|
|
|
175
156
|
Dart
|
|
176
157
|
|
|
177
|
-
PostHog AI
|
|
178
|
-
|
|
179
158
|
```dart
|
|
180
159
|
final enabledVariant = await Posthog().getFeatureFlag('flag-key');
|
|
181
160
|
if (enabledVariant == 'variant-key') { // replace 'variant-key' with the key of your variant
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
|
|
2
2
|
|
|
3
|
-
# Go Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Go Feature Flags installation - Docs
|
|
3
|
+
# Go Feature Flags installation
|
|
8
4
|
|
|
9
5
|
1. 1
|
|
10
6
|
|
|
@@ -16,8 +12,6 @@ Copy page
|
|
|
16
12
|
|
|
17
13
|
Terminal
|
|
18
14
|
|
|
19
|
-
PostHog AI
|
|
20
|
-
|
|
21
15
|
```bash
|
|
22
16
|
go get "github.com/posthog/posthog-go"
|
|
23
17
|
```
|
|
@@ -32,13 +26,13 @@ Copy page
|
|
|
32
26
|
|
|
33
27
|
main.go
|
|
34
28
|
|
|
35
|
-
PostHog AI
|
|
36
|
-
|
|
37
29
|
```go
|
|
38
30
|
package main
|
|
31
|
+
|
|
39
32
|
import (
|
|
40
33
|
"github.com/posthog/posthog-go"
|
|
41
34
|
)
|
|
35
|
+
|
|
42
36
|
func main() {
|
|
43
37
|
client, _ := posthog.NewWithConfig("<ph_project_token>", posthog.Config{Endpoint: "https://us.i.posthog.com"})
|
|
44
38
|
defer client.Close()
|
|
@@ -55,8 +49,6 @@ Copy page
|
|
|
55
49
|
|
|
56
50
|
Go
|
|
57
51
|
|
|
58
|
-
PostHog AI
|
|
59
|
-
|
|
60
52
|
```go
|
|
61
53
|
client.Enqueue(posthog.Capture{
|
|
62
54
|
DistinctId: "user_123",
|
|
@@ -124,8 +116,6 @@ Copy page
|
|
|
124
116
|
|
|
125
117
|
Go
|
|
126
118
|
|
|
127
|
-
PostHog AI
|
|
128
|
-
|
|
129
119
|
```go
|
|
130
120
|
client.Enqueue(posthog.Capture{
|
|
131
121
|
DistinctId: "distinct_id_of_your_user",
|
|
@@ -140,8 +130,6 @@ Copy page
|
|
|
140
130
|
|
|
141
131
|
Go
|
|
142
132
|
|
|
143
|
-
PostHog AI
|
|
144
|
-
|
|
145
133
|
```go
|
|
146
134
|
client.Enqueue(posthog.Capture{
|
|
147
135
|
DistinctId: "distinct_id_of_your_user",
|