vybekiit 0.7.26 → 0.7.28
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 +3910 -1300
- package/dist/global-guidance/language.md +443 -0
- package/dist/global-skills/add-ai/SKILL.md +1 -1
- package/dist/global-skills/add-analytics/SKILL.md +1 -1
- package/dist/global-skills/add-blog/SKILL.md +1 -1
- package/dist/global-skills/add-crud/SKILL.md +1 -1
- package/dist/global-skills/add-files/SKILL.md +1 -1
- package/dist/global-skills/add-images/SKILL.md +1 -1
- package/dist/global-skills/add-language/SKILL.md +1 -1
- package/dist/global-skills/add-notifications/SKILL.md +1 -1
- package/dist/global-skills/add-realtime/SKILL.md +1 -1
- package/dist/global-skills/add-route/SKILL.md +1 -1
- package/dist/global-skills/add-search/SKILL.md +1 -1
- package/dist/global-skills/add-signin/SKILL.md +1 -1
- package/dist/global-skills/add-teams/SKILL.md +1 -1
- package/dist/global-skills/add-upload/SKILL.md +1 -1
- 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/back-up-my-code/SKILL.md +1 -1
- package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
- package/dist/global-skills/buy-domain/SKILL.md +1 -1
- package/dist/global-skills/check-safety/SKILL.md +1 -1
- package/dist/global-skills/configure-capabilities/SKILL.md +1 -1
- package/dist/global-skills/connect-account/SKILL.md +1 -1
- package/dist/global-skills/connect-account-backend/SKILL.md +1 -1
- package/dist/global-skills/design-my-data/SKILL.md +1 -1
- package/dist/global-skills/doctor/SKILL.md +1 -1
- 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/go-live/SKILL.md +1 -1
- package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
- package/dist/global-skills/harden/SKILL.md +1 -1
- 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 +16 -14
- package/dist/global-skills/plan-my-idea/SKILL.md +1 -1
- package/dist/global-skills/publish-app/SKILL.md +1 -1
- package/dist/global-skills/publish-extension/SKILL.md +1 -1
- 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/reset-password/SKILL.md +1 -1
- package/dist/global-skills/save-data/SKILL.md +1 -1
- package/dist/global-skills/setup-email/SKILL.md +1 -1
- package/dist/global-skills/setup-payments/SKILL.md +1 -1
- package/dist/global-skills/setup-sms/SKILL.md +1 -1
- package/dist/global-skills/sign-in-with-email-link/SKILL.md +1 -1
- package/dist/global-skills/sign-in-with-google/SKILL.md +1 -1
- package/dist/global-skills/sign-in-with-phone/SKILL.md +1 -1
- 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/track-errors/SKILL.md +1 -1
- package/dist/global-skills/update-kit/SKILL.md +1 -1
- 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 +17 -13
- package/dist/global-skills/watch-my-app/SKILL.md +53 -0
- package/dist/global-skills/wire-auth/SKILL.md +1 -1
- package/dist/global-skills/wire-database/SKILL.md +1 -1
- package/dist/global-skills/wire-email/SKILL.md +1 -1
- package/dist/global-skills/wire-payments/SKILL.md +1 -1
- 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
|
-
# iOS Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# iOS Feature Flags installation - Docs
|
|
3
|
+
# iOS Feature Flags installation
|
|
8
4
|
|
|
9
5
|
1. 1
|
|
10
6
|
|
|
@@ -16,8 +12,6 @@ Copy page
|
|
|
16
12
|
|
|
17
13
|
Package.swift
|
|
18
14
|
|
|
19
|
-
PostHog AI
|
|
20
|
-
|
|
21
15
|
```swift
|
|
22
16
|
dependencies: [
|
|
23
17
|
.package(url: "https://github.com/PostHog/posthog-ios.git", from: "3.56.0")
|
|
@@ -28,8 +22,6 @@ Copy page
|
|
|
28
22
|
|
|
29
23
|
Podfile
|
|
30
24
|
|
|
31
|
-
PostHog AI
|
|
32
|
-
|
|
33
25
|
```ruby
|
|
34
26
|
pod "PostHog", "~> 3.56"
|
|
35
27
|
```
|
|
@@ -44,18 +36,19 @@ Copy page
|
|
|
44
36
|
|
|
45
37
|
AppDelegate.swift
|
|
46
38
|
|
|
47
|
-
PostHog AI
|
|
48
|
-
|
|
49
39
|
```swift
|
|
50
40
|
import Foundation
|
|
51
41
|
import PostHog
|
|
52
42
|
import UIKit
|
|
43
|
+
|
|
53
44
|
class AppDelegate: NSObject, UIApplicationDelegate {
|
|
54
45
|
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
|
55
46
|
let POSTHOG_PROJECT_TOKEN = "<ph_project_token>"
|
|
56
47
|
let POSTHOG_HOST = "https://us.i.posthog.com"
|
|
48
|
+
|
|
57
49
|
let config = PostHogConfig(projectToken: POSTHOG_PROJECT_TOKEN, host: POSTHOG_HOST)
|
|
58
50
|
PostHogSDK.shared.setup(config)
|
|
51
|
+
|
|
59
52
|
return true
|
|
60
53
|
}
|
|
61
54
|
}
|
|
@@ -71,8 +64,6 @@ Copy page
|
|
|
71
64
|
|
|
72
65
|
Swift
|
|
73
66
|
|
|
74
|
-
PostHog AI
|
|
75
|
-
|
|
76
67
|
```swift
|
|
77
68
|
PostHogSDK.shared.capture("button_clicked", properties: ["button_name": "signup"])
|
|
78
69
|
```
|
|
@@ -87,8 +78,6 @@ Copy page
|
|
|
87
78
|
|
|
88
79
|
Swift
|
|
89
80
|
|
|
90
|
-
PostHog AI
|
|
91
|
-
|
|
92
81
|
```swift
|
|
93
82
|
let isMyFlagEnabled = PostHogSDK.shared.isFeatureEnabled("flag-key")
|
|
94
83
|
if isMyFlagEnabled {
|
|
@@ -108,8 +97,6 @@ Copy page
|
|
|
108
97
|
|
|
109
98
|
Swift
|
|
110
99
|
|
|
111
|
-
PostHog AI
|
|
112
|
-
|
|
113
100
|
```swift
|
|
114
101
|
let enabledVariant = PostHogSDK.shared.getFeatureFlag("flag-key")
|
|
115
102
|
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
|
-
# Java Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Java Feature Flags installation - Docs
|
|
3
|
+
# Java Feature Flags installation
|
|
8
4
|
|
|
9
5
|
The best way to install the PostHog Java SDK is with a build system like Gradle or Maven. This ensures you can easily upgrade to the latest versions.
|
|
10
6
|
|
|
@@ -16,8 +12,6 @@ All you need to do is add the `posthog-server` module to your `build.gradle`:
|
|
|
16
12
|
|
|
17
13
|
build.gradle
|
|
18
14
|
|
|
19
|
-
PostHog AI
|
|
20
|
-
|
|
21
15
|
```kotlin
|
|
22
16
|
dependencies {
|
|
23
17
|
implementation 'com.posthog:posthog-server:2.+'
|
|
@@ -30,8 +24,6 @@ All you need to do is add the `posthog-server` module to your `pom.xml`:
|
|
|
30
24
|
|
|
31
25
|
pom.xml
|
|
32
26
|
|
|
33
|
-
PostHog AI
|
|
34
|
-
|
|
35
27
|
```xml
|
|
36
28
|
<dependency>
|
|
37
29
|
<groupId>com.posthog</groupId>
|
|
@@ -48,21 +40,23 @@ See [`com.posthog.posthog-server`](https://central.sonatype.com/artifact/com.pos
|
|
|
48
40
|
|
|
49
41
|
Java
|
|
50
42
|
|
|
51
|
-
PostHog AI
|
|
52
|
-
|
|
53
43
|
```java
|
|
54
44
|
import com.posthog.server.PostHog;
|
|
55
45
|
import com.posthog.server.PostHogConfig;
|
|
56
46
|
import com.posthog.server.PostHogInterface;
|
|
47
|
+
|
|
57
48
|
class Sample {
|
|
58
49
|
private static final String POSTHOG_API_KEY = "<ph_project_token>";
|
|
59
50
|
private static final String POSTHOG_HOST = "https://us.i.posthog.com";
|
|
51
|
+
|
|
60
52
|
public static void main(String args[]) {
|
|
61
53
|
PostHogConfig config = PostHogConfig
|
|
62
54
|
.builder(POSTHOG_API_KEY)
|
|
63
55
|
.host(POSTHOG_HOST)
|
|
64
56
|
.build();
|
|
57
|
+
|
|
65
58
|
PostHogInterface posthog = PostHog.with(config);
|
|
59
|
+
|
|
66
60
|
posthog.flush(); // send any remaining events
|
|
67
61
|
posthog.close(); // shut down the client
|
|
68
62
|
}
|
|
@@ -81,8 +75,6 @@ To see detailed logging, set the debug configuration option to true.
|
|
|
81
75
|
|
|
82
76
|
Java
|
|
83
77
|
|
|
84
|
-
PostHog AI
|
|
85
|
-
|
|
86
78
|
```java
|
|
87
79
|
PostHogConfig config = PostHogConfig
|
|
88
80
|
.builder(POSTHOG_API_KEY)
|
|
@@ -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
|
-
# Laravel
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Laravel - Docs
|
|
3
|
+
# Laravel
|
|
8
4
|
|
|
9
5
|
PostHog integrates with Laravel through the [PostHog PHP SDK](/docs/libraries/php.md). This page covers Laravel-specific setup. For SDK features such as event capture, identifying users, feature flags, group analytics, and configuration options, see the [PHP SDK docs](/docs/libraries/php.md).
|
|
10
6
|
|
|
@@ -14,8 +10,6 @@ Install the PHP SDK as described in the [PHP installation guide](/docs/libraries
|
|
|
14
10
|
|
|
15
11
|
.env
|
|
16
12
|
|
|
17
|
-
PostHog AI
|
|
18
|
-
|
|
19
13
|
```bash
|
|
20
14
|
POSTHOG_API_KEY=<ph_project_token>
|
|
21
15
|
POSTHOG_HOST=https://us.i.posthog.com
|
|
@@ -25,8 +19,6 @@ Add PostHog to Laravel's services config:
|
|
|
25
19
|
|
|
26
20
|
config/services.php
|
|
27
21
|
|
|
28
|
-
PostHog AI
|
|
29
|
-
|
|
30
22
|
```php
|
|
31
23
|
'posthog' => [
|
|
32
24
|
'api_key' => env('POSTHOG_API_KEY'),
|
|
@@ -38,13 +30,14 @@ Initialize PostHog in the `boot` method of `app/Providers/AppServiceProvider.php
|
|
|
38
30
|
|
|
39
31
|
app/Providers/AppServiceProvider.php
|
|
40
32
|
|
|
41
|
-
PostHog AI
|
|
42
|
-
|
|
43
33
|
```php
|
|
44
34
|
<?php
|
|
35
|
+
|
|
45
36
|
namespace App\Providers;
|
|
37
|
+
|
|
46
38
|
use Illuminate\Support\ServiceProvider;
|
|
47
39
|
use PostHog\PostHog;
|
|
40
|
+
|
|
48
41
|
class AppServiceProvider extends ServiceProvider
|
|
49
42
|
{
|
|
50
43
|
public function boot(): void
|
|
@@ -52,6 +45,7 @@ class AppServiceProvider extends ServiceProvider
|
|
|
52
45
|
if (! config('services.posthog.api_key')) {
|
|
53
46
|
return;
|
|
54
47
|
}
|
|
48
|
+
|
|
55
49
|
PostHog::init(
|
|
56
50
|
config('services.posthog.api_key'),
|
|
57
51
|
[
|
|
@@ -72,15 +66,16 @@ Add middleware like this:
|
|
|
72
66
|
|
|
73
67
|
app/Http/Middleware/PostHogRequestContext.php
|
|
74
68
|
|
|
75
|
-
PostHog AI
|
|
76
|
-
|
|
77
69
|
```php
|
|
78
70
|
<?php
|
|
71
|
+
|
|
79
72
|
namespace App\Http\Middleware;
|
|
73
|
+
|
|
80
74
|
use Closure;
|
|
81
75
|
use Illuminate\Http\Request;
|
|
82
76
|
use PostHog\PostHog;
|
|
83
77
|
use Symfony\Component\HttpFoundation\Response;
|
|
78
|
+
|
|
84
79
|
final class PostHogRequestContext
|
|
85
80
|
{
|
|
86
81
|
public function handle(Request $request, Closure $next): Response
|
|
@@ -88,7 +83,9 @@ final class PostHogRequestContext
|
|
|
88
83
|
if (! config('services.posthog.api_key')) {
|
|
89
84
|
return $next($request);
|
|
90
85
|
}
|
|
86
|
+
|
|
91
87
|
$context = PostHog::contextFromHeaders($request->headers->all());
|
|
88
|
+
|
|
92
89
|
$context['properties'] = array_merge(
|
|
93
90
|
$context['properties'] ?? [],
|
|
94
91
|
array_filter([
|
|
@@ -99,6 +96,7 @@ final class PostHogRequestContext
|
|
|
99
96
|
'$ip' => $request->ip(),
|
|
100
97
|
], static fn ($value): bool => $value !== null && $value !== '')
|
|
101
98
|
);
|
|
99
|
+
|
|
102
100
|
return PostHog::withContext(
|
|
103
101
|
$context,
|
|
104
102
|
static fn (): Response => $next($request),
|
|
@@ -118,17 +116,17 @@ In Laravel 11 and later, add a report callback in `bootstrap/app.php`:
|
|
|
118
116
|
|
|
119
117
|
bootstrap/app.php
|
|
120
118
|
|
|
121
|
-
PostHog AI
|
|
122
|
-
|
|
123
119
|
```php
|
|
124
120
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
125
121
|
use PostHog\PostHog;
|
|
126
122
|
use Throwable;
|
|
123
|
+
|
|
127
124
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
128
125
|
$exceptions->report(function (Throwable $e): void {
|
|
129
126
|
if (! config('services.posthog.api_key')) {
|
|
130
127
|
return;
|
|
131
128
|
}
|
|
129
|
+
|
|
132
130
|
PostHog::captureException(
|
|
133
131
|
$e,
|
|
134
132
|
auth()->id() !== null ? (string) auth()->id() : null,
|
|
@@ -151,8 +149,6 @@ If you prefer immediate delivery in queue workers, configure the PHP SDK with `b
|
|
|
151
149
|
|
|
152
150
|
PHP
|
|
153
151
|
|
|
154
|
-
PostHog AI
|
|
155
|
-
|
|
156
152
|
```php
|
|
157
153
|
PostHog::init(
|
|
158
154
|
'<ph_project_token>',
|
|
@@ -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
|
-
# Next.js
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Next.js - Docs
|
|
3
|
+
# Next.js
|
|
8
4
|
|
|
9
5
|
PostHog makes it easy to get data about traffic and usage of your [Next.js](https://nextjs.org/) app. Integrating PostHog into your site enables analytics about user behavior, custom events capture, session recordings, feature flags, and more.
|
|
10
6
|
|
|
@@ -37,8 +33,6 @@ Or, to integrate manually, continue with the rest of this guide.
|
|
|
37
33
|
|
|
38
34
|
Install `posthog-js` using your package manager:
|
|
39
35
|
|
|
40
|
-
PostHog AI
|
|
41
|
-
|
|
42
36
|
### npm
|
|
43
37
|
|
|
44
38
|
```bash
|
|
@@ -65,8 +59,6 @@ bun add posthog-js
|
|
|
65
59
|
|
|
66
60
|
> **If your site sets a Content-Security-Policy**, it needs to allow PostHog. This applies to the snippet and to package installs alike: the SDK lazy-loads extra bundles (session replay, surveys) from PostHog's CDN, and sends events to the ingestion host. PostHog serves from subdomains of `posthog.com` that change over time, so allow the wildcard:
|
|
67
61
|
>
|
|
68
|
-
> PostHog AI
|
|
69
|
-
>
|
|
70
62
|
> ```
|
|
71
63
|
> script-src 'self' https://*.posthog.com;
|
|
72
64
|
> connect-src 'self' https://*.posthog.com;
|
|
@@ -79,8 +71,6 @@ Add your environment variables to your `.env.local` file and to your hosting pro
|
|
|
79
71
|
|
|
80
72
|
.env.local
|
|
81
73
|
|
|
82
|
-
PostHog AI
|
|
83
|
-
|
|
84
74
|
```shell
|
|
85
75
|
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN=<ph_project_token>
|
|
86
76
|
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
|
@@ -92,12 +82,11 @@ These values need to start with `NEXT_PUBLIC_` to be accessible on the client-si
|
|
|
92
82
|
|
|
93
83
|
Next.js provides the [`instrumentation-client.ts|js`](https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client) file for client-side setup. Add it to the root of your Next.js app (for both app and pages router) and initialize PostHog in it like this:
|
|
94
84
|
|
|
95
|
-
PostHog AI
|
|
96
|
-
|
|
97
85
|
### instrumentation-client.js
|
|
98
86
|
|
|
99
87
|
```javascript
|
|
100
88
|
import posthog from 'posthog-js'
|
|
89
|
+
|
|
101
90
|
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN, {
|
|
102
91
|
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
|
|
103
92
|
defaults: '2026-05-30'
|
|
@@ -108,6 +97,7 @@ posthog.init(process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN, {
|
|
|
108
97
|
|
|
109
98
|
```typescript
|
|
110
99
|
import posthog from 'posthog-js'
|
|
100
|
+
|
|
111
101
|
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN!, {
|
|
112
102
|
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
|
|
113
103
|
defaults: '2026-05-30'
|
|
@@ -145,8 +135,6 @@ If your app calls your own backend, `tracing_headers` adds `X-POSTHOG-DISTINCT-I
|
|
|
145
135
|
|
|
146
136
|
JavaScript
|
|
147
137
|
|
|
148
|
-
PostHog AI
|
|
149
|
-
|
|
150
138
|
```javascript
|
|
151
139
|
posthog.init('<ph_project_token>', {
|
|
152
140
|
api_host: 'https://us.i.posthog.com',
|
|
@@ -181,7 +169,11 @@ For certain features like [heatmaps](/docs/toolbar/heatmaps.md), your Web Applic
|
|
|
181
169
|
|
|
182
170
|
**US**: `44.205.89.55`, `52.4.194.122`, `44.208.188.173`
|
|
183
171
|
|
|
184
|
-
These are public, stable IPs used by PostHog services
|
|
172
|
+
These are public, stable IPs used by PostHog services.
|
|
173
|
+
|
|
174
|
+
PostHog captures heatmap screenshots using [Browserless](https://www.browserless.io), which has its own IP addresses. Browserless [publishes the current list here](https://docs.browserless.io/baas/troubleshooting/whitelisting-ips).
|
|
175
|
+
|
|
176
|
+
An allowlist does not help when your app has a private address. For apps on an internal network, see [internal and intranet applications](/docs/session-replay/troubleshooting.md#internal-and-intranet-applications).
|
|
185
177
|
|
|
186
178
|
## Accessing PostHog
|
|
187
179
|
|
|
@@ -189,11 +181,10 @@ Once initialized in `instrumentation-client.js|ts`, import `posthog` from `posth
|
|
|
189
181
|
|
|
190
182
|
JavaScript
|
|
191
183
|
|
|
192
|
-
PostHog AI
|
|
193
|
-
|
|
194
184
|
```javascript
|
|
195
185
|
"use client";
|
|
196
186
|
import posthog from "posthog-js";
|
|
187
|
+
|
|
197
188
|
export default function Home() {
|
|
198
189
|
return (
|
|
199
190
|
<div>
|
|
@@ -209,13 +200,13 @@ The [React feature flag hooks](/docs/libraries/react.md#feature-flags) work auto
|
|
|
209
200
|
|
|
210
201
|
JavaScript
|
|
211
202
|
|
|
212
|
-
PostHog AI
|
|
213
|
-
|
|
214
203
|
```javascript
|
|
215
204
|
"use client";
|
|
216
205
|
import { useFeatureFlagEnabled } from "@posthog/react";
|
|
206
|
+
|
|
217
207
|
export default function FeatureComponent() {
|
|
218
208
|
const showNewFeature = useFeatureFlagEnabled("new-feature");
|
|
209
|
+
|
|
219
210
|
return showNewFeature ? <NewFeature /> : <OldFeature />;
|
|
220
211
|
}
|
|
221
212
|
```
|
|
@@ -235,8 +226,6 @@ Next.js enables you to both server-side render pages and add server-side functio
|
|
|
235
226
|
|
|
236
227
|
First, install the `posthog-node` library:
|
|
237
228
|
|
|
238
|
-
PostHog AI
|
|
239
|
-
|
|
240
229
|
### npm
|
|
241
230
|
|
|
242
231
|
```bash
|
|
@@ -271,11 +260,10 @@ This enables us to send events and fetch data from PostHog on the server – wit
|
|
|
271
260
|
|
|
272
261
|
JavaScript
|
|
273
262
|
|
|
274
|
-
PostHog AI
|
|
275
|
-
|
|
276
263
|
```javascript
|
|
277
264
|
// app/posthog.js
|
|
278
265
|
import { PostHog } from 'posthog-node'
|
|
266
|
+
|
|
279
267
|
export default function PostHogClient() {
|
|
280
268
|
const posthogClient = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN, {
|
|
281
269
|
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
|
|
@@ -295,17 +283,18 @@ To use this client, we import it into our pages and call it with the `PostHogCli
|
|
|
295
283
|
|
|
296
284
|
JavaScript
|
|
297
285
|
|
|
298
|
-
PostHog AI
|
|
299
|
-
|
|
300
286
|
```javascript
|
|
301
287
|
import Link from 'next/link'
|
|
302
288
|
import PostHogClient from '../posthog'
|
|
289
|
+
|
|
303
290
|
export default async function About() {
|
|
291
|
+
|
|
304
292
|
const posthog = PostHogClient()
|
|
305
293
|
const flags = await posthog.getAllFlags(
|
|
306
294
|
'user_distinct_id' // replace with a user's distinct ID
|
|
307
295
|
);
|
|
308
296
|
await posthog.shutdown()
|
|
297
|
+
|
|
309
298
|
return (
|
|
310
299
|
<main>
|
|
311
300
|
<h1>About</h1>
|
|
@@ -326,21 +315,22 @@ This looks like this:
|
|
|
326
315
|
|
|
327
316
|
JavaScript
|
|
328
317
|
|
|
329
|
-
PostHog AI
|
|
330
|
-
|
|
331
318
|
```javascript
|
|
332
319
|
// pages/posts/[id].js
|
|
333
320
|
import { useContext, useEffect, useState } from 'react'
|
|
334
321
|
import { getServerSession } from "next-auth/next"
|
|
335
322
|
import { authOptions } from '@/lib/auth'
|
|
336
323
|
import { PostHog } from 'posthog-node'
|
|
324
|
+
|
|
337
325
|
export default function Post({ post, flags }) {
|
|
338
326
|
const [ctaState, setCtaState] = useState()
|
|
327
|
+
|
|
339
328
|
useEffect(() => {
|
|
340
329
|
if (flags) {
|
|
341
330
|
setCtaState(flags['blog-cta'])
|
|
342
331
|
}
|
|
343
332
|
})
|
|
333
|
+
|
|
344
334
|
return (
|
|
345
335
|
<div>
|
|
346
336
|
<h1>{post.title}</h1>
|
|
@@ -353,10 +343,13 @@ export default function Post({ post, flags }) {
|
|
|
353
343
|
</div>
|
|
354
344
|
)
|
|
355
345
|
}
|
|
346
|
+
|
|
356
347
|
export async function getServerSideProps(ctx) {
|
|
348
|
+
|
|
357
349
|
// Pass authOptions, or your session callbacks don't run.
|
|
358
350
|
const session = await getServerSession(ctx.req, ctx.res, authOptions)
|
|
359
351
|
let flags = null
|
|
352
|
+
|
|
360
353
|
if (session) {
|
|
361
354
|
const client = new PostHog(
|
|
362
355
|
process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN,
|
|
@@ -364,8 +357,10 @@ export async function getServerSideProps(ctx) {
|
|
|
364
357
|
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
|
|
365
358
|
}
|
|
366
359
|
)
|
|
360
|
+
|
|
367
361
|
// A stable ID from your auth system, not an email. See the note below.
|
|
368
362
|
const distinctId = session.user.id
|
|
363
|
+
|
|
369
364
|
flags = await client.getAllFlags(distinctId);
|
|
370
365
|
client.capture({
|
|
371
366
|
distinctId,
|
|
@@ -374,8 +369,10 @@ export async function getServerSideProps(ctx) {
|
|
|
374
369
|
$current_url: ctx.req.url,
|
|
375
370
|
},
|
|
376
371
|
});
|
|
372
|
+
|
|
377
373
|
await client.shutdown()
|
|
378
374
|
}
|
|
375
|
+
|
|
379
376
|
const { posts } = await import('../../blog.json')
|
|
380
377
|
const post = posts.find((post) => post.id.toString() === ctx.params.id)
|
|
381
378
|
return {
|
|
@@ -391,8 +388,6 @@ export async function getServerSideProps(ctx) {
|
|
|
391
388
|
>
|
|
392
389
|
> JavaScript
|
|
393
390
|
>
|
|
394
|
-
> PostHog AI
|
|
395
|
-
>
|
|
396
391
|
> ```javascript
|
|
397
392
|
> // lib/auth.js
|
|
398
393
|
> export const authOptions = {
|
|
@@ -419,8 +414,6 @@ You can override that configuration when initializing PostHog, but make sure you
|
|
|
419
414
|
|
|
420
415
|
TSX
|
|
421
416
|
|
|
422
|
-
PostHog AI
|
|
423
|
-
|
|
424
417
|
```jsx
|
|
425
418
|
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN, {
|
|
426
419
|
// ... your configuration
|
|
@@ -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
|
-
# Node.js Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Node.js Feature Flags installation - Docs
|
|
3
|
+
# Node.js Feature Flags installation
|
|
8
4
|
|
|
9
5
|
1. 1
|
|
10
6
|
|
|
@@ -14,8 +10,6 @@ Copy page
|
|
|
14
10
|
|
|
15
11
|
Install the PostHog Node.js library using your package manager:
|
|
16
12
|
|
|
17
|
-
PostHog AI
|
|
18
|
-
|
|
19
13
|
### npm
|
|
20
14
|
|
|
21
15
|
```bash
|
|
@@ -34,6 +28,12 @@ Copy page
|
|
|
34
28
|
pnpm add posthog-node
|
|
35
29
|
```
|
|
36
30
|
|
|
31
|
+
### bun
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bun add posthog-node
|
|
35
|
+
```
|
|
36
|
+
|
|
37
37
|
2. 2
|
|
38
38
|
|
|
39
39
|
## Initialize PostHog
|
|
@@ -44,10 +44,9 @@ Copy page
|
|
|
44
44
|
|
|
45
45
|
Node.js
|
|
46
46
|
|
|
47
|
-
PostHog AI
|
|
48
|
-
|
|
49
47
|
```javascript
|
|
50
48
|
import { PostHog } from 'posthog-node'
|
|
49
|
+
|
|
51
50
|
const client = new PostHog(
|
|
52
51
|
'<ph_project_token>',
|
|
53
52
|
{
|
|
@@ -66,8 +65,6 @@ Copy page
|
|
|
66
65
|
|
|
67
66
|
Node.js
|
|
68
67
|
|
|
69
|
-
PostHog AI
|
|
70
|
-
|
|
71
68
|
```javascript
|
|
72
69
|
client.capture({
|
|
73
70
|
distinctId: 'distinct_id_of_the_user',
|
|
@@ -129,8 +126,6 @@ Copy page
|
|
|
129
126
|
|
|
130
127
|
Node.js
|
|
131
128
|
|
|
132
|
-
PostHog AI
|
|
133
|
-
|
|
134
129
|
```javascript
|
|
135
130
|
client.capture({
|
|
136
131
|
distinctId: 'distinct_id_of_your_user',
|
|
@@ -145,8 +140,6 @@ Copy page
|
|
|
145
140
|
|
|
146
141
|
Node.js
|
|
147
142
|
|
|
148
|
-
PostHog AI
|
|
149
|
-
|
|
150
143
|
```javascript
|
|
151
144
|
client.capture({
|
|
152
145
|
distinctId: 'distinct_id_of_your_user',
|
|
@@ -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
|
-
# PHP Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# PHP Feature Flags installation - Docs
|
|
3
|
+
# PHP 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
|
composer require posthog/posthog-php
|
|
23
17
|
```
|
|
@@ -32,8 +26,6 @@ Copy page
|
|
|
32
26
|
|
|
33
27
|
PHP
|
|
34
28
|
|
|
35
|
-
PostHog AI
|
|
36
|
-
|
|
37
29
|
```php
|
|
38
30
|
PostHog\PostHog::init(
|
|
39
31
|
'<ph_project_token>',
|
|
@@ -51,8 +43,6 @@ Copy page
|
|
|
51
43
|
|
|
52
44
|
PHP
|
|
53
45
|
|
|
54
|
-
PostHog AI
|
|
55
|
-
|
|
56
46
|
```php
|
|
57
47
|
PostHog::capture([
|
|
58
48
|
'distinctId' => 'test-user',
|
|
@@ -106,8 +96,6 @@ Copy page
|
|
|
106
96
|
|
|
107
97
|
PHP
|
|
108
98
|
|
|
109
|
-
PostHog AI
|
|
110
|
-
|
|
111
99
|
```php
|
|
112
100
|
PostHog::capture(array(
|
|
113
101
|
'distinctId' => 'distinct_id_of_your_user',
|
|
@@ -122,8 +110,6 @@ Copy page
|
|
|
122
110
|
|
|
123
111
|
PHP
|
|
124
112
|
|
|
125
|
-
PostHog AI
|
|
126
|
-
|
|
127
113
|
```php
|
|
128
114
|
PostHog::capture(array(
|
|
129
115
|
'distinctId' => 'distinct_id_of_your_user',
|
|
@@ -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
|
-
# Python Feature Flags installation
|
|
4
|
-
|
|
5
|
-
Copy page
|
|
6
|
-
|
|
7
|
-
# Python Feature Flags installation - Docs
|
|
3
|
+
# Python 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
|
pip install posthog
|
|
23
17
|
```
|
|
@@ -32,10 +26,9 @@ Copy page
|
|
|
32
26
|
|
|
33
27
|
Python
|
|
34
28
|
|
|
35
|
-
PostHog AI
|
|
36
|
-
|
|
37
29
|
```python
|
|
38
30
|
from posthog import Posthog
|
|
31
|
+
|
|
39
32
|
posthog = Posthog(
|
|
40
33
|
project_api_key='<ph_project_token>',
|
|
41
34
|
host='https://us.i.posthog.com'
|
|
@@ -58,8 +51,6 @@ Copy page
|
|
|
58
51
|
|
|
59
52
|
Python
|
|
60
53
|
|
|
61
|
-
PostHog AI
|
|
62
|
-
|
|
63
54
|
```python
|
|
64
55
|
import posthog
|
|
65
56
|
posthog.capture('user_signed_up', distinct_id='user_123', properties={'example_property': 'example_value'})
|
|
@@ -113,8 +104,6 @@ Copy page
|
|
|
113
104
|
|
|
114
105
|
Python
|
|
115
106
|
|
|
116
|
-
PostHog AI
|
|
117
|
-
|
|
118
107
|
```python
|
|
119
108
|
posthog.capture(
|
|
120
109
|
distinct_id="distinct_id_of_the_user",
|
|
@@ -129,8 +118,6 @@ Copy page
|
|
|
129
118
|
|
|
130
119
|
Python
|
|
131
120
|
|
|
132
|
-
PostHog AI
|
|
133
|
-
|
|
134
121
|
```python
|
|
135
122
|
posthog.capture(
|
|
136
123
|
"event_name",
|