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.
Files changed (232) hide show
  1. package/dist/bin.js +3891 -1301
  2. package/dist/global-skills/aws-cdk/SKILL.md +19 -5
  3. package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
  4. package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
  5. package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
  6. package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
  7. package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
  8. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
  9. package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
  10. package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
  11. package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
  12. package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
  13. package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
  14. package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
  15. package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
  16. package/dist/global-skills/aws-serverless/SKILL.md +9 -1
  17. package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
  18. package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
  19. package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
  20. package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
  21. package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
  22. package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
  23. package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
  24. package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
  25. package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
  26. package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
  27. package/dist/global-skills/eas-simulator/SKILL.md +48 -26
  28. package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
  29. package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
  30. package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
  31. package/dist/global-skills/eas-update/SKILL.md +146 -0
  32. package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
  33. package/dist/global-skills/expo-animation/RECIPES.md +2 -2
  34. package/dist/global-skills/expo-animation/SKILL.md +9 -2
  35. package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
  36. package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
  37. package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
  38. package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
  39. package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
  40. package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
  41. package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
  42. package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
  43. package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
  44. package/dist/global-skills/expo-design-system/SKILL.md +27 -7
  45. package/dist/global-skills/expo-design-system/references/audit.md +7 -2
  46. package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
  47. package/dist/global-skills/expo-examples/SKILL.md +0 -1
  48. package/dist/global-skills/expo-examples/references/catalog.md +1 -1
  49. package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
  50. package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
  51. package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
  52. package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
  53. package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
  54. package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
  55. package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
  56. package/dist/global-skills/expo-native-ui/references/media.md +15 -20
  57. package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
  58. package/dist/global-skills/expo-overview/SKILL.md +17 -12
  59. package/dist/global-skills/expo-router/SKILL.md +5 -3
  60. package/dist/global-skills/expo-router/references/tabs.md +5 -5
  61. package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
  62. package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
  63. package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
  64. package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
  65. package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
  66. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
  67. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
  68. package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
  69. package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
  70. package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
  71. package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
  72. package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
  73. package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
  74. package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
  75. package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
  76. package/dist/global-skills/firebase-data-connect/examples.md +4 -4
  77. package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
  78. package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
  79. package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
  80. package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
  81. package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
  82. package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
  83. package/dist/global-skills/firebase-data-connect/templates.md +2 -1
  84. package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
  85. package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
  86. package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
  87. package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
  88. package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
  89. package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
  90. package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
  91. package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
  92. package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
  93. package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
  94. package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
  95. package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
  96. package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
  97. package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
  98. package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
  99. package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
  100. package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
  101. package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
  102. package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
  103. package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
  104. package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
  105. package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
  106. package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
  107. package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
  108. package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
  109. package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
  110. package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
  111. package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
  112. package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
  113. package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
  114. package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
  115. package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
  116. package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
  117. package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
  118. package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
  119. package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
  120. package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
  121. package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
  122. package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
  123. package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
  124. package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
  125. package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
  126. package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
  127. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
  128. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
  129. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
  130. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
  131. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
  132. package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
  133. package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
  134. package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
  135. package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
  136. package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
  137. package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
  138. package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
  139. package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
  140. package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
  141. package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
  142. package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
  143. package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
  144. package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
  145. package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
  146. package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
  147. package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
  148. package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
  149. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
  150. package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
  151. package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
  152. package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
  153. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
  154. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
  155. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
  156. package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
  157. package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
  158. package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
  159. package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
  160. package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
  161. package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
  162. package/dist/global-skills/manifest.json +8 -2
  163. package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
  164. package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
  165. package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
  166. package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
  167. package/dist/global-skills/neon/SKILL.md +207 -213
  168. package/dist/global-skills/neon/references/auth.md +12 -0
  169. package/dist/global-skills/neon/references/claimable-neon.md +10 -14
  170. package/dist/global-skills/neon/references/function-triggers.md +53 -0
  171. package/dist/global-skills/neon/references/logs-loki.md +61 -0
  172. package/dist/global-skills/neon/references/parse-env.md +32 -0
  173. package/dist/global-skills/neon/references/sdk.md +7 -0
  174. package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
  175. package/dist/global-skills/neon-auth/SKILL.md +155 -0
  176. package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
  177. package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
  178. package/dist/global-skills/neon-functions/SKILL.md +159 -84
  179. package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
  180. package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
  181. package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
  182. package/dist/global-skills/neon-functions/references/mcp.md +1 -1
  183. package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
  184. package/dist/global-skills/neon-functions/references/sse.md +8 -5
  185. package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
  186. package/dist/global-skills/neon-postgres/SKILL.md +120 -17
  187. package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
  188. package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
  189. package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
  190. package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
  191. package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
  192. package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
  193. package/dist/global-skills/onboarding/SKILL.md +8 -6
  194. package/dist/global-skills/resend/SKILL.md +4 -2
  195. package/dist/global-skills/resend/references/broadcasts.md +6 -1
  196. package/dist/global-skills/resend/references/receiving.md +29 -10
  197. package/dist/global-skills/resend/references/sending/email-management.md +14 -4
  198. package/dist/global-skills/resend/references/topics.md +9 -6
  199. package/dist/global-skills/resend/references/usage.md +117 -0
  200. package/dist/global-skills/resend/references/webhooks.md +59 -2
  201. package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
  202. package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
  203. package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
  204. package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
  205. package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
  206. package/dist/global-skills/supabase/SKILL.md +6 -0
  207. package/dist/global-skills/use-railway/SKILL.md +42 -22
  208. package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
  209. package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
  210. package/dist/global-skills/use-railway/references/configure.md +17 -2
  211. package/dist/global-skills/use-railway/references/databases.md +107 -0
  212. package/dist/global-skills/use-railway/references/deploy.md +5 -5
  213. package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
  214. package/dist/global-skills/use-railway/references/iac.md +66 -77
  215. package/dist/global-skills/use-railway/references/operate.md +26 -3
  216. package/dist/global-skills/use-railway/references/request.md +31 -23
  217. package/dist/global-skills/use-railway/references/setup.md +16 -5
  218. package/dist/global-skills/use-railway/references/tracing.md +261 -0
  219. package/dist/global-skills/use-railway/references/usage.md +52 -0
  220. package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
  221. package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
  222. package/dist/global-skills/watch-my-app/SKILL.md +53 -0
  223. package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
  224. package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
  225. package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
  226. package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
  227. package/dist/global-skills/wrangler/SKILL.md +48 -901
  228. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
  229. package/package.json +9 -8
  230. package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
  231. package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
  232. 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
- # Angular - Docs
4
-
5
- Copy page
6
-
7
- # Angular - Docs
3
+ # Angular
8
4
 
9
5
  PostHog makes it easy to get data about traffic and usage of your [Angular](https://angular.dev/) app. Integrating PostHog into your site enables analytics about user behavior, custom events capture, session recordings, feature flags, and more.
10
6
 
@@ -14,8 +10,6 @@ This guide walks you through integrating PostHog into your Angular app using the
14
10
 
15
11
  Install `posthog-js` using your package manager:
16
12
 
17
- PostHog AI
18
-
19
13
  ### npm
20
14
 
21
15
  ```bash
@@ -42,8 +36,6 @@ bun add posthog-js
42
36
 
43
37
  > **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:
44
38
  >
45
- > PostHog AI
46
- >
47
39
  > ```
48
40
  > script-src 'self' https://*.posthog.com;
49
41
  > connect-src 'self' https://*.posthog.com;
@@ -67,13 +59,12 @@ Create a service by running `ng g service services/posthog`. The service should
67
59
 
68
60
  posthog.service.ts
69
61
 
70
- PostHog AI
71
-
72
62
  ```typescript
73
63
  // src/app/services/posthog.service.ts
74
64
  import { Injectable, NgZone } from "@angular/core";
75
65
  import posthog from "posthog-js";
76
66
  import { environment } from "../../environments/environment";
67
+
77
68
  @Injectable({ providedIn: "root" })
78
69
  export class PosthogService {
79
70
  constructor(
@@ -98,13 +89,12 @@ Then, inject the service in your app's root component `app.component.ts`. This w
98
89
 
99
90
  app.component.ts
100
91
 
101
- PostHog AI
102
-
103
92
  ```typescript
104
93
  // src/app/app.component.ts
105
94
  import { Component } from "@angular/core";
106
95
  import { RouterOutlet } from "@angular/router";
107
96
  import { PosthogService } from "./services/posthog.service";
97
+
108
98
  @Component({
109
99
  selector: "app-root",
110
100
  styleUrls: ["./app.component.scss"],
@@ -114,6 +104,7 @@ import { PosthogService } from "./services/posthog.service";
114
104
  })
115
105
  export class AppComponent {
116
106
  title = "angular-app";
107
+
117
108
  constructor(posthogService: PosthogService) {}
118
109
  }
119
110
  ```
@@ -124,8 +115,6 @@ In your `src/main.ts`, initialize PostHog using your project token and instance
124
115
 
125
116
  main.ts
126
117
 
127
- PostHog AI
128
-
129
118
  ```typescript
130
119
  // src/main.ts
131
120
  import { bootstrapApplication } from '@angular/platform-browser';
@@ -133,10 +122,12 @@ import { appConfig } from './app/app.config';
133
122
  import { AppComponent } from './app/app.component';
134
123
  import { environment } from "./environments/environment";
135
124
  import posthog from 'posthog-js'
125
+
136
126
  posthog.init(environment.posthogKey, {
137
127
  api_host: environment.posthogHost,
138
128
  defaults: '2026-05-30'
139
129
  })
130
+
140
131
  bootstrapApplication(AppComponent, appConfig)
141
132
  .catch((err) => console.error(err));
142
133
  ```
@@ -155,8 +146,6 @@ If your app calls your own backend, `tracing_headers` adds `X-POSTHOG-DISTINCT-I
155
146
 
156
147
  JavaScript
157
148
 
158
- PostHog AI
159
-
160
149
  ```javascript
161
150
  posthog.init('<ph_project_token>', {
162
151
  api_host: 'https://us.i.posthog.com',
@@ -197,7 +186,11 @@ For certain features like [heatmaps](/docs/toolbar/heatmaps.md), your Web Applic
197
186
 
198
187
  **US**: `44.205.89.55`, `52.4.194.122`, `44.208.188.173`
199
188
 
200
- These are public, stable IPs used by PostHog services (e.g., Celery tasks for snapshots).
189
+ These are public, stable IPs used by PostHog services.
190
+
191
+ 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).
192
+
193
+ 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).
201
194
 
202
195
  ## Tracking pageviews
203
196
 
@@ -209,14 +202,14 @@ To [capture custom events](/docs/product-analytics/capture-events.md), import `p
209
202
 
210
203
  app.component.ts
211
204
 
212
- PostHog AI
213
-
214
205
  ```typescript
215
206
  import { Component } from '@angular/core';
216
207
  import posthog from 'posthog-js'
208
+
217
209
  @Component({
218
210
  // existing component code
219
211
  })
212
+
220
213
  export class AppComponent {
221
214
  handleClick() {
222
215
  posthog.capture(
@@ -237,11 +230,10 @@ The recorder tool attempts to detect when an Angular zone is present and avoid t
237
230
 
238
231
  posthog.service.ts
239
232
 
240
- PostHog AI
241
-
242
233
  ```typescript
243
234
  import { Injectable } from '@angular/core';
244
235
  import posthog from 'posthog-js'
236
+
245
237
  @Injectable({ providedIn: 'root' })
246
238
  export class PostHogSessionRecordingService {
247
239
  constructor(private ngZone: NgZone) {}
@@ -268,10 +260,9 @@ Update your `posthog.service.ts` to restrict the initialization of the PostHog w
268
260
 
269
261
  posthog.service.ts
270
262
 
271
- PostHog AI
272
-
273
263
  ```typescript
274
264
  import { PLATFORM_ID } from "@angular/core";
265
+
275
266
  @Injectable({ providedIn: "root" })
276
267
  export class PosthogService {
277
268
  constructor(
@@ -283,6 +274,7 @@ export class PosthogService {
283
274
  this.initPostHog(); //+
284
275
  }
285
276
  }
277
+
286
278
  private initPostHog() {
287
279
  this.ngZone.runOutsideAngular(() => {
288
280
  posthog.init(environment.posthogKey, {
@@ -294,8 +286,6 @@ Angular SSR uses a `server.ts` file to handle requests. We can add any server-si
294
286
 
295
287
  First, install the `posthog-node` package to run on the server side.
296
288
 
297
- PostHog AI
298
-
299
289
  ### npm
300
290
 
301
291
  ```bash
@@ -324,17 +314,18 @@ Then, add the following code to the `server.ts` file:
324
314
 
325
315
  server.ts
326
316
 
327
- PostHog AI
328
-
329
317
  ```typescript
330
318
  // src/server.ts
319
+
331
320
  import { environment } from './environments/environment';
332
321
  import { PostHog } from 'posthog-node'
322
+
333
323
  /**
334
324
  * Extract distinct ID from PostHog cookie
335
325
  */
336
326
  function getDistinctIdFromCookie(cookieHeader: string | undefined): string | null {
337
327
  if (!cookieHeader) return null;
328
+
338
329
  const cookieMatch = cookieHeader.match(`ph_${environment.posthogKey}_posthog=([^;]+)`);
339
330
  if (cookieMatch) {
340
331
  try {
@@ -347,17 +338,21 @@ function getDistinctIdFromCookie(cookieHeader: string | undefined): string | nul
347
338
  }
348
339
  return null;
349
340
  }
341
+
350
342
  /**
351
343
  * Handle all other requests by rendering the Angular application.
352
344
  */
353
345
  app.get('**', async (req, res, next) => {
354
346
  const { protocol, originalUrl, baseUrl, headers } = req;
347
+
355
348
  const distinctId = getDistinctIdFromCookie(headers.cookie);
356
349
  let isFeatureEnabled = false;
350
+
357
351
  const client = new PostHog(
358
352
  environment.posthogKey,
359
353
  { host: environment.posthogHost }
360
354
  );
355
+
361
356
  if (distinctId) {
362
357
  client.capture({
363
358
  distinctId: distinctId,
@@ -366,9 +361,11 @@ app.get('**', async (req, res, next) => {
366
361
  message: 'Hello from Angular SSR!'
367
362
  }
368
363
  })
364
+
369
365
  isFeatureEnabled = await client.isFeatureEnabled(
370
366
  'your_feature_flag_key', distinctId) || false;
371
367
  }
368
+
372
369
  commonEngine
373
370
  .render({
374
371
  bootstrap,
@@ -382,6 +379,7 @@ app.get('**', async (req, res, next) => {
382
379
  })
383
380
  .then((html) => res.send(html))
384
381
  .catch((err) => next(err));
382
+
385
383
  await client.shutdown()
386
384
  });
387
385
  ```
@@ -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
- # Astro - Docs
4
-
5
- Copy page
6
-
7
- # Astro - Docs
3
+ # Astro
8
4
 
9
5
  PostHog makes it easy to get data about traffic and usage of your [Astro](https://astro.build/) app. Integrating PostHog into your site enables analytics about user behavior, custom events capture, session recordings, feature flags, and more.
10
6
 
@@ -26,8 +22,6 @@ In your `src/components` folder, create a `posthog.astro` file:
26
22
 
27
23
  Terminal
28
24
 
29
- PostHog AI
30
-
31
25
  ```bash
32
26
  cd ./src/components
33
27
  # or 'cd ./src && mkdir components && cd ./components' if your components folder doesnt exist
@@ -38,11 +32,12 @@ In this file, add your `Web snippet` which you can find in [your project setting
38
32
 
39
33
  posthog.astro
40
34
 
41
- PostHog AI
42
-
43
35
  ```javascript
36
+ ---
37
+ // src/components/posthog.astro
38
+ ---
44
39
  <script is:inline>
45
- !function(t,e){var o,n,p,r;e.__SV||(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=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.js",(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.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagResult reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
40
+ !function(t,e){var o,n,p,r;e.__SV||(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=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.js",(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="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagResult reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
46
41
  posthog.init('<ph_project_token>', {
47
42
  api_host:'https://us.i.posthog.com',
48
43
  defaults: '2026-05-30'
@@ -52,8 +47,6 @@ PostHog AI
52
47
 
53
48
  > **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:
54
49
  >
55
- > PostHog AI
56
- >
57
50
  > ```
58
51
  > script-src 'self' https://*.posthog.com;
59
52
  > connect-src 'self' https://*.posthog.com;
@@ -70,8 +63,6 @@ Update your `posthog.astro` file to wrap the snippet with a check:
70
63
 
71
64
  posthog.astro
72
65
 
73
- PostHog AI
74
-
75
66
  ```javascript
76
67
  ---
77
68
  // src/components/posthog.astro
@@ -79,7 +70,9 @@ PostHog AI
79
70
  <script is:inline>
80
71
  if (!window.__posthog_initialized) {
81
72
  window.__posthog_initialized = true;
82
- !function(t,e){var o,n,p,r;e.__SV||(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=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.js",(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.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagResult reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
73
+
74
+ !function(t,e){var o,n,p,r;e.__SV||(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=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.js",(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="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagResult reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
75
+
83
76
  posthog.init('<ph_project_token>', {
84
77
  api_host: 'https://us.i.posthog.com',
85
78
  defaults: '2026-05-30',
@@ -95,8 +88,6 @@ The next step is to a create a [Layout](https://docs.astro.build/en/core-concept
95
88
 
96
89
  Terminal
97
90
 
98
- PostHog AI
99
-
100
91
  ```bash
101
92
  cd .. && cd .. # move back to your base directory if you're still in src/components/posthog.astro
102
93
  cd ./src/layouts
@@ -108,8 +99,6 @@ Add the following code to `PostHogLayout.astro`:
108
99
 
109
100
  PostHogLayout.astro
110
101
 
111
- PostHog AI
112
-
113
102
  ```javascript
114
103
  ---
115
104
  import PostHog from '../components/posthog.astro'
@@ -123,8 +112,6 @@ Lastly, update `index.astro` to wrap your existing app components with the new L
123
112
 
124
113
  index.astro
125
114
 
126
- PostHog AI
127
-
128
115
  ```javascript
129
116
  ---
130
117
  import PostHogLayout from '../layouts/PostHogLayout.astro';
@@ -148,8 +135,6 @@ If your app calls your own backend, `tracing_headers` adds `X-POSTHOG-DISTINCT-I
148
135
 
149
136
  JavaScript
150
137
 
151
- PostHog AI
152
-
153
138
  ```javascript
154
139
  posthog.init('<ph_project_token>', {
155
140
  api_host: 'https://us.i.posthog.com',
@@ -184,7 +169,11 @@ For certain features like [heatmaps](/docs/toolbar/heatmaps.md), your Web Applic
184
169
 
185
170
  **US**: `44.205.89.55`, `52.4.194.122`, `44.208.188.173`
186
171
 
187
- These are public, stable IPs used by PostHog services (e.g., Celery tasks for snapshots).
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).
188
177
 
189
178
  ## Next steps
190
179
 
@@ -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 SDK configuration - Docs
4
-
5
- Copy page
6
-
7
- # iOS SDK configuration - Docs
3
+ # iOS SDK configuration
8
4
 
9
5
  ## Autocapture configuration
10
6
 
@@ -16,8 +12,6 @@ Use `tracingHeaders` to connect iOS network requests to backend events, errors,
16
12
 
17
13
  Swift
18
14
 
19
- PostHog AI
20
-
21
15
  ```swift
22
16
  let configuration = PostHogConfig(projectToken: "<ph_project_token>", host: "https://us.i.posthog.com")
23
17
  configuration.tracingHeaders = ["api.example.com"]
@@ -38,8 +32,6 @@ You can also configure the flush interval with `flushIntervalSeconds` (default `
38
32
 
39
33
  Swift
40
34
 
41
- PostHog AI
42
-
43
35
  ```swift
44
36
  configuration.flushAt = 1
45
37
  configuration.flushIntervalSeconds = 30
@@ -49,8 +41,6 @@ You can also manually flush the queue to start sending events immediately instea
49
41
 
50
42
  Swift
51
43
 
52
- PostHog AI
53
-
54
44
  ```swift
55
45
  PostHogSDK.shared.capture("logged_out")
56
46
  PostHogSDK.shared.flush()
@@ -74,10 +64,9 @@ Redact URLs in event properties
74
64
 
75
65
  Swift
76
66
 
77
- PostHog AI
78
-
79
67
  ```swift
80
68
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
69
+
81
70
  config.setBeforeSend { event in
82
71
  // Redact URLs
83
72
  if let url = event.properties["url"] as? String {
@@ -91,15 +80,15 @@ Redact sensitive information from event properties
91
80
 
92
81
  Swift
93
82
 
94
- PostHog AI
95
-
96
83
  ```swift
97
84
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
85
+
98
86
  config.setBeforeSend { event in
99
87
  // Redact sensitive information
100
88
  if let email = event.properties["email"] as? String {
101
89
  event.properties["email"] = email.map { _ in "*" }.joined()
102
90
  }
91
+
103
92
  return event
104
93
  }
105
94
  ```
@@ -108,10 +97,9 @@ Drop events by event name
108
97
 
109
98
  Swift
110
99
 
111
- PostHog AI
112
-
113
100
  ```swift
114
101
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
102
+
115
103
  config.setBeforeSend { event in
116
104
  // Drop all events named "Stale Event"
117
105
  if event.event == "Stale Event" {
@@ -129,11 +117,11 @@ Because it's just a function, you can filter however you like – an **ignorelis
129
117
 
130
118
  Swift
131
119
 
132
- PostHog AI
133
-
134
120
  ```swift
135
121
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
122
+
136
123
  let ignoredScreens: Set<String> = ["Splash", "Debug"]
124
+
137
125
  config.setBeforeSend { event in
138
126
  if event.event == "$screen",
139
127
  let screenName = event.properties["$screen_name"] as? String,
@@ -152,10 +140,9 @@ Sample events by event name
152
140
 
153
141
  Swift
154
142
 
155
- PostHog AI
156
-
157
143
  ```swift
158
144
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
145
+
159
146
  config.setBeforeSend { event in
160
147
  // Sample 10% of Sampled Event events
161
148
  if event.event == "Sampled Event" {
@@ -177,10 +164,9 @@ You can provide an array of `BeforeSendBlock` functions to be called one after t
177
164
 
178
165
  Swift
179
166
 
180
- PostHog AI
181
-
182
167
  ```swift
183
168
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
169
+
184
170
  config.setBeforeSend(
185
171
  // First block: Drop all events named "Stale Event"
186
172
  { event in
@@ -208,8 +194,6 @@ config.setBeforeSend(
208
194
 
209
195
  Swift
210
196
 
211
- PostHog AI
212
-
213
197
  ```swift
214
198
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
215
199
  config.appGroupIdentifier = "group.com.yourcompany.yourapp"
@@ -224,11 +208,11 @@ Method swizzling is enabled by default, but can be disabled by setting the relev
224
208
 
225
209
  | Feature | Description | Config option |
226
210
  | --- | --- | --- |
227
- | Screen view tracking | Automatically captures when view controllers are presented | config.captureScreenViews |
228
- | Element interactions | Automatically tracks user interactions with UI elements | config.captureElementInteractions |
229
- | Rage clicks | Automatically captures $rageclick events for rapid repeated taps in the same area (iOS/macCatalyst, UIKit) | config.rageClickConfig.enabled |
230
- | Session replay | Records user sessions | config.sessionReplay |
231
- | Surveys | Displays surveys at appropriate times | config.surveys |
211
+ | Screen view tracking | Automatically captures when view controllers are presented | `config.captureScreenViews` |
212
+ | Element interactions | Automatically tracks user interactions with UI elements | `config.captureElementInteractions` |
213
+ | Rage clicks | Automatically captures `$rageclick` events for rapid repeated taps in the same area (iOS/macCatalyst, UIKit) | `config.rageClickConfig.enabled` |
214
+ | Session replay | Records user sessions | `config.sessionReplay` |
215
+ | Surveys | Displays surveys at appropriate times | `config.surveys` |
232
216
  | Advanced metrics tracking | Provides more precise session ID calculation and rotation by detecting user activity and idleness | N/A |
233
217
 
234
218
  ### Disabling all method swizzling
@@ -237,8 +221,6 @@ Since version 3.34.0, you can opt out of all swizzling using the `enableSwizzlin
237
221
 
238
222
  Swift
239
223
 
240
- PostHog AI
241
-
242
224
  ```swift
243
225
  let config = PostHogConfig(projectToken: "<ph_project_token>", host: "<ph_api_client_host>")
244
226
  config.enableSwizzling = false
@@ -265,37 +247,37 @@ The [`PostHogConfig` object](https://github.com/PostHog/posthog-ios/blob/main/Po
265
247
 
266
248
  | Attribute | Description |
267
249
  | --- | --- |
268
- | flushAtType: IntegerDefault: 20 (5 on tvOS) | The number of queued events that the posthog client should flush at. Setting this to 1 will not queue any events and will use more battery. |
269
- | flushIntervalSecondsType: TimeIntervalDefault: 30 | The amount of time to wait before each tick of the flush timer, in seconds. Smaller values will make events delivered in a more real-time manner and also use more battery. A value smaller than 10 seconds will seriously degrade overall performance. |
270
- | maxQueueSizeType: IntegerDefault: 1000 (100 on tvOS) | The maximum number of items to queue before starting to drop old ones. This should be a value greater than zero, the behavior is undefined otherwise. |
271
- | maxBatchSizeType: IntegerDefault: 50 | Number of maximum events in a batch call. |
272
- | maxRetriesType: IntegerDefault: 3 | Maximum number of consecutive flush attempts before the entire queue is dropped to avoid infinite retries against a permanently-broken backend (e.g. wrong API key, exhausted quota, deterministic 5xx). Increments on every retriable failure including HTTP 413 cap halving; resets on a successful 2xx response. |
273
- | captureApplicationLifecycleEventsType: BooleanDefault: true | Whether the posthog client should automatically make a capture call for application lifecycle events, such as "Application Installed", "Application Updated" and "Application Opened". |
274
- | captureScreenViewsType: BooleanDefault: true | Whether the posthog client should automatically make a screen call when a view controller is added to a view hierarchy. Because the underlying implementation uses method swizzling, we recommend initializing the posthog client as early as possible (before any screens are displayed), ideally during the Application delegate's applicationDidFinishLaunching method. |
275
- | enableSwizzlingType: BooleanDefault: true | Enable method swizzling for SDK functionality that depends on it. When disabled, functionality that requires swizzling (like autocapture, screen views, session replay, surveys) will not be installed. |
276
- | captureElementInteractionsType: BooleanDefault: false | (UIKit only) Whether the posthog client should automatically make a capture call when the user interacts with an element in a screen. |
277
- | rageClickConfigType: ObjectDefault: .init() | (iOS/macCatalyst, UIKit) Rage click detection configuration. Includes enabled (default true), minimumTapCount (default 3), thresholdPoints (default 30), and timeoutInterval (default 1.0). Works independently of captureElementInteractions. Available in version 3.51.0+. |
278
- | sendFeatureFlagEventType: BooleanDefault: true | Send a $feature_flag_called event when a feature flag is used automatically. |
279
- | preloadFeatureFlagsType: BooleanDefault: true | Preload feature flags automatically. |
280
- | evaluationContextsType: Array of StringsDefault: undefined | Evaluation context tags that constrain which feature flags are evaluated. When set, only flags with matching evaluation context tags (or no evaluation context tags) will be returned. See [evaluation contexts documentation](/docs/feature-flags/evaluation-contexts.md) for more details. Available in version 3.38.0+. The legacy parameter evaluationEnvironments (version 3.33.0+) is also supported for backward compatibility. |
281
- | debugType: BooleanDefault: false | Logs the SDK messages to the Xcode console. |
282
- | optOutType: BooleanDefault: false | Prevents capturing any data if enabled. |
283
- | getAnonymousIdType: FunctionDefault: undefined | Hook that allows for modification of the default mechanism for generating anonymous id (which as of now is just random UUID v7). |
284
- | dataModeType: EnumDefault: .any | Controls when queued data is flushed. Use .wifi to flush only on Wi-Fi; .cellular is a legacy value and behaves like .any. |
285
- | personProfilesType: EnumDefault: .identifiedOnly | Determines the behavior for processing user profiles. |
286
- | setDefaultPersonPropertiesType: BooleanDefault: true | Automatically set common device and app properties (such as $app_version, $os_name, and $device_type) as person properties for feature flag evaluation. See [property overrides](/docs/feature-flags/property-overrides.md) for more details. |
287
- | sessionReplayType: BooleanDefault: false | Enable Recording of Session Replays. |
288
- | sessionReplayConfigType: ObjectDefault: .init() | Session Replay configuration. See [Session Replay installation](/docs/session-replay/installation/ios.md) for more details. |
289
- | tracingHeadersType: Array of StringsDefault: nil | Exact hostnames that should receive PostHog tracing headers when the SDK instruments URLSession requests. |
290
- | errorTrackingConfigType: ObjectDefault: .init() | Error Tracking configuration. See the [error tracking docs](/docs/error-tracking.md) for more details. |
291
- | logsType: ObjectDefault: .init() | Structured Logs configuration. See [Logs installation](/docs/logs/installation/ios.md) for more details. |
292
- | surveysConfigType: ObjectDefault: .init() | Surveys configuration, including custom survey delegates and display language overrides. |
293
- | urlSessionConfigurationType: URLSessionConfigurationDefault: .default | Custom URLSessionConfiguration used by the SDK for PostHog API requests. |
294
- | appGroupIdentifierType: StringDefault: nil | The identifier of the App Group that should be used to store shared analytics data. PostHog will try to get the physical location of the App Group's shared container, otherwise fallback to the default location. |
295
- | reuseAnonymousIdType: BooleanDefault: false | Whether the SDK should reuse the anonymous Id between user changes. When enabled, a single Id will be used for all anonymous users on this device. |
296
- | surveysType: BooleanDefault: true | Enable Surveys. |
297
- | setBeforeSendType: FunctionDefault: undefined | Hook that allows for amending, sampling, or dropping events before they are sent to PostHog. |
298
- | bootstrapType: PostHogBootstrapConfigDefault: nil | Seeds identity (distinctId, isIdentifiedId) and feature-flag state (featureFlags, featureFlagPayloads) before the first /flags response. Bootstrapped identity applies to the first session; only enabled flags are served, until the first /flags response replaces them. See [SDK bootstrapping](/docs/libraries/bootstrapping.md#behavior-on-mobile-sdks). |
250
+ | `flushAt` **Type:** Integer **Default:** `20` (`5` on tvOS) | The number of queued events that the posthog client should flush at. Setting this to `1` will not queue any events and will use more battery. |
251
+ | `flushIntervalSeconds` **Type:** TimeInterval **Default:** `30` | The amount of time to wait before each tick of the flush timer, in seconds. Smaller values will make events delivered in a more real-time manner and also use more battery. A value smaller than 10 seconds will seriously degrade overall performance. |
252
+ | `maxQueueSize` **Type:** Integer **Default:** `1000` (`100` on tvOS) | The maximum number of items to queue before starting to drop old ones. This should be a value greater than zero, the behavior is undefined otherwise. |
253
+ | `maxBatchSize` **Type:** Integer **Default:** `50` | Number of maximum events in a batch call. |
254
+ | `maxRetries` **Type:** Integer **Default:** `3` | Maximum number of consecutive flush attempts before the entire queue is dropped to avoid infinite retries against a permanently-broken backend (e.g. wrong API key, exhausted quota, deterministic 5xx). Increments on every retriable failure including HTTP 413 cap halving; resets on a successful 2xx response. |
255
+ | `captureApplicationLifecycleEvents` **Type:** Boolean **Default:** `true` | Whether the posthog client should automatically make a capture call for application lifecycle events, such as "Application Installed", "Application Updated" and "Application Opened". |
256
+ | `captureScreenViews` **Type:** Boolean **Default:** `true` | Whether the posthog client should automatically make a screen call when a view controller is added to a view hierarchy. Because the underlying implementation uses method swizzling, we recommend initializing the posthog client as early as possible (before any screens are displayed), ideally during the Application delegate's applicationDidFinishLaunching method. |
257
+ | `enableSwizzling` **Type:** Boolean **Default:** `true` | Enable method swizzling for SDK functionality that depends on it. When disabled, functionality that requires swizzling (like autocapture, screen views, session replay, surveys) will not be installed. |
258
+ | `captureElementInteractions` **Type:** Boolean **Default:** `false` | (UIKit only) Whether the posthog client should automatically make a capture call when the user interacts with an element in a screen. |
259
+ | `rageClickConfig` **Type:** Object **Default:** `.init()` | (iOS/macCatalyst, UIKit) Rage click detection configuration. Includes `enabled` (default `true`), `minimumTapCount` (default `3`), `thresholdPoints` (default `30`), and `timeoutInterval` (default `1.0`). Works independently of `captureElementInteractions`. Available in version 3.51.0+. |
260
+ | `sendFeatureFlagEvent` **Type:** Boolean **Default:** `true` | Send a `$feature_flag_called` event when a feature flag is used automatically. |
261
+ | `preloadFeatureFlags` **Type:** Boolean **Default:** `true` | Preload feature flags automatically. |
262
+ | `evaluationContexts` **Type:** Array of Strings **Default:** `undefined` | Evaluation context tags that constrain which feature flags are evaluated. When set, only flags with matching evaluation context tags (or no evaluation context tags) will be returned. See [evaluation contexts documentation](/docs/feature-flags/evaluation-contexts.md) for more details. Available in version 3.38.0+. The legacy parameter `evaluationEnvironments` (version 3.33.0+) is also supported for backward compatibility. |
263
+ | `debug` **Type:** Boolean **Default:** `false` | Logs the SDK messages to the Xcode console. |
264
+ | `optOut` **Type:** Boolean **Default:** `false` | Prevents capturing any data if enabled. |
265
+ | `getAnonymousId` **Type:** Function **Default:** `undefined` | Hook that allows for modification of the default mechanism for generating anonymous id (which as of now is just random UUID v7). |
266
+ | `dataMode` **Type:** Enum **Default:** `.any` | Controls when queued data is flushed. Use `.wifi` to flush only on Wi-Fi; `.cellular` is a legacy value and behaves like `.any`. |
267
+ | `personProfiles` **Type:** Enum **Default:** `.identifiedOnly` | Determines the behavior for processing user profiles. |
268
+ | `setDefaultPersonProperties` **Type:** Boolean **Default:** `true` | Automatically set common device and app properties (such as `$app_version`, `$os_name`, and `$device_type`) as person properties for feature flag evaluation. See [property overrides](/docs/feature-flags/property-overrides.md) for more details. |
269
+ | `sessionReplay` **Type:** Boolean **Default:** `false` | Enable Recording of Session Replays. |
270
+ | `sessionReplayConfig` **Type:** Object **Default:** `.init()` | Session Replay configuration. See [Session Replay installation](/docs/session-replay/installation/ios.md) for more details. |
271
+ | `tracingHeaders` **Type:** Array of Strings **Default:** `nil` | Exact hostnames that should receive PostHog tracing headers when the SDK instruments `URLSession` requests. |
272
+ | `errorTrackingConfig` **Type:** Object **Default:** `.init()` | Error Tracking configuration. See the [error tracking docs](/docs/error-tracking.md) for more details. |
273
+ | `logs` **Type:** Object **Default:** `.init()` | Structured Logs configuration. See [Logs installation](/docs/logs/installation/ios.md) for more details. |
274
+ | `surveysConfig` **Type:** Object **Default:** `.init()` | Surveys configuration, including custom survey delegates and display language overrides. |
275
+ | `urlSessionConfiguration` **Type:** URLSessionConfiguration **Default:** `.default` | Custom `URLSessionConfiguration` used by the SDK for PostHog API requests. |
276
+ | `appGroupIdentifier` **Type:** String **Default:** `nil` | The identifier of the App Group that should be used to store shared analytics data. PostHog will try to get the physical location of the App Group's shared container, otherwise fallback to the default location. |
277
+ | `reuseAnonymousId` **Type:** Boolean **Default:** `false` | Whether the SDK should reuse the anonymous Id between user changes. When enabled, a single Id will be used for all anonymous users on this device. |
278
+ | `surveys` **Type:** Boolean **Default:** `true` | Enable Surveys. |
279
+ | `setBeforeSend` **Type:** Function **Default:** `undefined` | Hook that allows for amending, sampling, or dropping events before they are sent to PostHog. |
280
+ | `bootstrap` **Type:** `PostHogBootstrapConfig` **Default:** `nil` | Seeds identity (`distinctId`, `isIdentifiedId`) and feature-flag state (`featureFlags`, `featureFlagPayloads`) before the first `/flags` response. Bootstrapped identity applies to the first session; only enabled flags are served, until the first `/flags` response replaces them. See [SDK bootstrapping](/docs/libraries/bootstrapping.md#behavior-on-mobile-sdks). |
299
281
 
300
282
  ### Still have questions?
301
283