vybekiit 0.7.33 → 0.7.35
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 +818 -92
- package/dist/global-skills/eas-app-stores/SKILL.md +2 -2
- package/dist/global-skills/eas-hosting/SKILL.md +2 -2
- package/dist/global-skills/eas-observe/SKILL.md +7 -15
- package/dist/global-skills/eas-observe/references/queries.md +51 -10
- package/dist/global-skills/eas-observe/references/setup.md +60 -7
- package/dist/global-skills/eas-simulator/SKILL.md +2 -2
- package/dist/global-skills/eas-simulator/references/run-your-app.md +2 -0
- package/dist/global-skills/eas-update/SKILL.md +2 -2
- package/dist/global-skills/eas-update-insights/SKILL.md +2 -2
- package/dist/global-skills/eas-workflows/SKILL.md +2 -2
- package/dist/global-skills/expo-animation/SKILL.md +2 -2
- package/dist/global-skills/expo-app-clip/SKILL.md +2 -2
- package/dist/global-skills/expo-brownfield/SKILL.md +2 -2
- package/dist/global-skills/expo-data-fetching/SKILL.md +2 -2
- package/dist/global-skills/expo-design-system/SKILL.md +2 -2
- package/dist/global-skills/expo-dev-client/SKILL.md +4 -2
- package/dist/global-skills/expo-dom/SKILL.md +2 -2
- package/dist/global-skills/expo-examples/SKILL.md +2 -2
- package/dist/global-skills/expo-migrate-module/SKILL.md +2 -2
- package/dist/global-skills/expo-module/SKILL.md +2 -2
- package/dist/global-skills/expo-native-ui/SKILL.md +2 -2
- package/dist/global-skills/expo-overview/SKILL.md +9 -4
- package/dist/global-skills/expo-overview/references/launch-without-dev-menu.md +24 -0
- package/dist/global-skills/expo-project-structure/SKILL.md +2 -2
- package/dist/global-skills/expo-router/SKILL.md +2 -2
- package/dist/global-skills/expo-ui/SKILL.md +2 -2
- package/dist/global-skills/expo-upgrade/SKILL.md +2 -2
- package/dist/global-skills/expo-web-to-native/SKILL.md +2 -2
- package/dist/global-skills/expo-web-to-native/references/verify-on-device.md +1 -1
- package/dist/global-skills/firebase-app-hosting-basics/SKILL.md +16 -3
- package/dist/global-skills/firebase-app-hosting-basics/references/cli_commands.md +10 -12
- package/dist/global-skills/firebase-app-hosting-basics/references/configuration.md +2 -1
- package/dist/global-skills/firebase-basics/SKILL.md +6 -4
- package/dist/global-skills/firebase-basics/references/web_setup.md +3 -3
- package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +81 -333
- package/dist/global-skills/instrument-feature-flags/references/android.md +19 -13
- package/dist/global-skills/instrument-feature-flags/references/api.md +17 -13
- package/dist/global-skills/instrument-feature-flags/references/best-practices.md +35 -35
- package/dist/global-skills/instrument-feature-flags/references/django.md +120 -72
- package/dist/global-skills/instrument-feature-flags/references/dotnet.md +48 -102
- package/dist/global-skills/instrument-feature-flags/references/elixir.md +4 -10
- package/dist/global-skills/instrument-feature-flags/references/flask.md +55 -39
- package/dist/global-skills/instrument-feature-flags/references/flutter.md +19 -13
- package/dist/global-skills/instrument-feature-flags/references/go.md +21 -13
- package/dist/global-skills/instrument-feature-flags/references/ios.md +19 -13
- package/dist/global-skills/instrument-feature-flags/references/java.md +4 -12
- package/dist/global-skills/instrument-feature-flags/references/laravel.md +18 -16
- package/dist/global-skills/instrument-feature-flags/references/next-js.md +44 -54
- package/dist/global-skills/instrument-feature-flags/references/nodejs.md +21 -13
- package/dist/global-skills/instrument-feature-flags/references/php.md +21 -13
- package/dist/global-skills/instrument-feature-flags/references/python.md +22 -14
- package/dist/global-skills/instrument-feature-flags/references/react-native.md +18 -13
- package/dist/global-skills/instrument-feature-flags/references/react.md +21 -14
- package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +31 -68
- package/dist/global-skills/instrument-feature-flags/references/ruby.md +21 -13
- package/dist/global-skills/instrument-feature-flags/references/rust.md +10 -34
- package/dist/global-skills/instrument-feature-flags/references/usage.md +94 -114
- package/dist/global-skills/instrument-feature-flags/references/web.md +21 -13
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-android.md +7 -7
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-expo.md +2 -2
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-fastapi.md +1 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-flask.md +1 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-laravel.md +2 -2
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-php.md +1 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-python.md +1 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby.md +1 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-swift.md +4 -4
- package/dist/global-skills/instrument-product-analytics/references/android.md +64 -109
- package/dist/global-skills/instrument-product-analytics/references/angular.md +32 -28
- package/dist/global-skills/instrument-product-analytics/references/astro.md +29 -34
- package/dist/global-skills/instrument-product-analytics/references/configuration.md +27 -42
- package/dist/global-skills/instrument-product-analytics/references/django.md +120 -72
- package/dist/global-skills/instrument-product-analytics/references/dotnet.md +48 -102
- package/dist/global-skills/instrument-product-analytics/references/elixir.md +25 -50
- package/dist/global-skills/instrument-product-analytics/references/flask.md +55 -39
- package/dist/global-skills/instrument-product-analytics/references/flutter.md +94 -96
- package/dist/global-skills/instrument-product-analytics/references/go.md +39 -77
- package/dist/global-skills/instrument-product-analytics/references/identify-users.md +24 -26
- package/dist/global-skills/instrument-product-analytics/references/ios.md +22 -22
- package/dist/global-skills/instrument-product-analytics/references/laravel.md +18 -16
- package/dist/global-skills/instrument-product-analytics/references/next-js.md +44 -54
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +32 -34
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +36 -36
- package/dist/global-skills/instrument-product-analytics/references/php.md +42 -87
- package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +15 -12
- package/dist/global-skills/instrument-product-analytics/references/python.md +106 -154
- package/dist/global-skills/instrument-product-analytics/references/react-native.md +97 -176
- package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +29 -40
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +29 -38
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +29 -40
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +32 -37
- package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +31 -68
- package/dist/global-skills/instrument-product-analytics/references/ruby.md +40 -96
- package/dist/global-skills/instrument-product-analytics/references/svelte.md +34 -34
- package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +19 -19
- package/dist/global-skills/instrument-product-analytics/references/usage.md +94 -114
- package/dist/global-skills/instrument-product-analytics/references/vue-js.md +33 -45
- package/dist/global-skills/manifest.json +2 -1
- package/dist/global-skills/mongodb-search-and-ai/SKILL.md +40 -22
- package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +8 -2
- package/dist/global-skills/mongodb-search-and-ai/references/quick-start.md +725 -0
- package/dist/global-skills/mongodb-search-and-ai/scripts/quickstart_complete.py +386 -0
- package/dist/global-skills/neon/SKILL.md +15 -10
- package/dist/global-skills/neon/references/claimable-neon.md +2 -0
- package/dist/global-skills/neon-functions/SKILL.md +12 -11
- package/dist/global-skills/neon-functions/references/sse.md +2 -2
- package/dist/global-skills/neon-object-storage/SKILL.md +5 -4
- package/dist/global-skills/neon-postgres/SKILL.md +4 -1
- package/dist/global-skills/neon-realtime/SKILL.md +207 -0
- package/dist/global-skills/neon-realtime/references/mutations.md +743 -0
- package/dist/global-skills/neon-realtime/references/queries.md +509 -0
- package/dist/global-skills/neon-realtime/references/reactivity.md +407 -0
- package/dist/global-skills/neon-realtime/references/ssr.md +695 -0
- package/dist/global-skills/neon-realtime/references/subscribing.md +485 -0
- package/dist/global-skills/resend/SKILL.md +4 -2
- package/dist/global-skills/resend/references/inboxes.md +377 -0
- package/dist/global-skills/resend/references/webhooks.md +9 -0
- package/dist/global-skills/stripe-best-practices/SKILL.md +1 -1
- package/dist/global-skills/stripe-best-practices/references/connect.md +1 -1
- package/dist/global-skills/stripe-best-practices/references/security.md +9 -9
- package/dist/global-skills/vybekiitReferences/backend/AGENTS.md +1 -1
- package/dist/global-skills/vybekiitReferences/backend/agent/goal-routes.json +303 -18
- package/dist/global-skills/vybekiitReferences/extension/AGENTS.md +1 -1
- package/dist/global-skills/vybekiitReferences/extension/agent/goal-routes.json +352 -18
- package/dist/global-skills/vybekiitReferences/mobile/AGENTS.md +1 -1
- package/dist/global-skills/vybekiitReferences/mobile/agent/goal-routes.json +413 -22
- package/dist/global-skills/vybekiitReferences/spa/AGENTS.md +1 -1
- package/dist/global-skills/vybekiitReferences/spa/agent/goal-routes.json +391 -21
- package/dist/global-skills/vybekiitReferences/web/AGENTS.md +14 -2
- package/dist/global-skills/vybekiitReferences/web/agent/goal-routes.json +490 -32
- package/package.json +8 -8
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Vue.js
|
|
4
4
|
|
|
5
|
+
Canonical URL: https://posthog.com/docs/libraries/vue-js
|
|
6
|
+
|
|
7
|
+
> **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.i.posthog.com` instead of `https://us.i.posthog.com` (ingestion host), and use `https://eu.posthog.com` instead of `https://us.posthog.com` or `https://app.posthog.com` (app host for links).
|
|
8
|
+
|
|
9
|
+
## On this page
|
|
10
|
+
|
|
11
|
+
- [Prerequisites](#prerequisites)
|
|
12
|
+
- [Setting up PostHog](#setting-up-posthog)
|
|
13
|
+
- [Identifying users](#identifying-users)
|
|
14
|
+
- [Capturing custom events, using feature flags, and more](#capturing-custom-events-using-feature-flags-and-more)
|
|
15
|
+
- [Next steps](#next-steps)
|
|
16
|
+
|
|
5
17
|
PostHog makes it easy to get data about usage of your [Vue.js](https://vuejs.org/) app. Integrating PostHog into your app enables analytics about user behavior, custom events capture, session replays, feature flags, and more.
|
|
6
18
|
|
|
7
|
-
This guide walks you through integrating PostHog into your app for both Vue 2 and Vue 3. We'll use the [JavaScript Web SDK](/docs/libraries/js.md) for this.
|
|
19
|
+
This guide walks you through integrating PostHog into your app for both Vue 2 and Vue 3. We'll use the [JavaScript Web SDK](https://posthog.com/docs/libraries/js.md) for this.
|
|
8
20
|
|
|
9
|
-
For integrating PostHog into a [Nuxt.js](https://nuxt.com/) app, see our [Nuxt guide](/docs/libraries/nuxt-js.md).
|
|
21
|
+
For integrating PostHog into a [Nuxt.js](https://nuxt.com/) app, see our [Nuxt guide](https://posthog.com/docs/libraries/nuxt-js.md).
|
|
10
22
|
|
|
11
23
|
## Prerequisites
|
|
12
24
|
|
|
@@ -51,7 +63,7 @@ bun add posthog-js
|
|
|
51
63
|
> worker-src 'self' blob: data:;
|
|
52
64
|
> ```
|
|
53
65
|
>
|
|
54
|
-
> `script-src` covers the snippet and the lazy-loaded bundles, `connect-src` covers event ingestion and feature flags, and `worker-src` covers session replay. The [toolbar needs a few more](/docs/advanced/content-security-policy.md), or use a [reverse proxy](/docs/advanced/proxy.md) so everything is first-party. Failing to do so causes silent failures where `capture` and `identify` calls never send, so the integration looks complete while zero events arrive. Remember `connect-src` falls back to `default-src`, so `default-src 'self'` blocks event delivery even when the script itself is bundled.
|
|
66
|
+
> `script-src` covers the snippet and the lazy-loaded bundles, `connect-src` covers event ingestion and feature flags, and `worker-src` covers session replay. The [toolbar needs a few more](https://posthog.com/docs/advanced/content-security-policy.md), or use a [reverse proxy](https://posthog.com/docs/advanced/proxy.md) so everything is first-party. Failing to do so causes silent failures where `capture` and `identify` calls never send, so the integration looks complete while zero events arrive. Remember `connect-src` falls back to `default-src`, so `default-src 'self'` blocks event delivery even when the script itself is bundled.
|
|
55
67
|
|
|
56
68
|
Next, depending on your Vue version, we recommend initializing PostHog using the composition API or as a plugin.
|
|
57
69
|
|
|
@@ -91,8 +103,6 @@ app.mount('#app')
|
|
|
91
103
|
|
|
92
104
|
Then, you can access PostHog throughout your app just by importing it from `posthog-js`.
|
|
93
105
|
|
|
94
|
-
TypeScript
|
|
95
|
-
|
|
96
106
|
```typescript
|
|
97
107
|
// src/App.vue
|
|
98
108
|
<script setup>
|
|
@@ -104,14 +114,12 @@ const handleClick = () => {
|
|
|
104
114
|
</script>
|
|
105
115
|
```
|
|
106
116
|
|
|
107
|
-
Once done, PostHog will begin [autocapturing](/docs/product-analytics/autocapture.md) events and pageviews (if enabled) and is ready to use throughout your app.
|
|
117
|
+
Once done, PostHog will begin [autocapturing](https://posthog.com/docs/product-analytics/autocapture.md) events and pageviews (if enabled) and is ready to use throughout your app.
|
|
108
118
|
|
|
109
119
|
## Vue 2: Plugins
|
|
110
120
|
|
|
111
121
|
Start by creating a `plugins` folder and adding a `posthog.js` file to that folder. In `posthog.js`, initialize PostHog using the `install` method with your project token and host. You can find these in your [project settings](https://us.posthog.com/project/settings).
|
|
112
122
|
|
|
113
|
-
JavaScript
|
|
114
|
-
|
|
115
123
|
```javascript
|
|
116
124
|
// src/plugins/posthog.js
|
|
117
125
|
import posthog from 'posthog-js'
|
|
@@ -130,8 +138,6 @@ export default {
|
|
|
130
138
|
|
|
131
139
|
Next, in `main.js`, import and use the plugin.
|
|
132
140
|
|
|
133
|
-
JavaScript
|
|
134
|
-
|
|
135
141
|
```javascript
|
|
136
142
|
// src/main.js
|
|
137
143
|
import Vue from 'vue'
|
|
@@ -150,18 +156,16 @@ This makes PostHog available as `this.$posthog` in any Vue component.
|
|
|
150
156
|
|
|
151
157
|
## Identifying users
|
|
152
158
|
|
|
153
|
-
> **Identifying users is required.** Call `posthog.identify('your-user-id')` after login to link events to a known user. This is what connects frontend event captures, [session replays](/docs/session-replay.md), [LLM traces](/docs/ai-engineering.md), and [error tracking](/docs/error-tracking.md) to the same person — and lets backend events link back too.
|
|
159
|
+
> **Identifying users is required.** Call `posthog.identify('your-user-id')` after login to link events to a known user. This is what connects frontend event captures, [session replays](https://posthog.com/docs/session-replay.md), [LLM traces](https://posthog.com/docs/ai-engineering.md), and [error tracking](https://posthog.com/docs/error-tracking.md) to the same person — and lets backend events link back too.
|
|
154
160
|
>
|
|
155
161
|
> Use a stable ID from your auth system when possible, not an email or display name. Send those as person properties instead. If your app has no other stable key, email works as a fallback if they are unique. Never a shared literal like `"anonymous"` or `"user"`, which pools many people onto one person and corrupts their data. When no ID is available at all, skip the identify and retain the anonymous distinct ID that's automatically assigned.
|
|
156
162
|
>
|
|
157
163
|
> Call `posthog.reset()` on logout, so the next person to use the browser doesn't inherit the last one's identity.
|
|
158
164
|
>
|
|
159
|
-
> See our guide on [identifying users](/docs/getting-started/identify-users.md) for how to set this up.
|
|
165
|
+
> See our guide on [identifying users](https://posthog.com/docs/getting-started/identify-users.md) for how to set this up.
|
|
160
166
|
|
|
161
167
|
If your app calls your own backend, `tracing_headers` adds `X-POSTHOG-DISTINCT-ID` and `X-POSTHOG-SESSION-ID` to matching `fetch` and `XMLHttpRequest` requests. This lets server-side SDKs link backend events, errors, and LLM traces back to frontend sessions and replays. Use hostnames only, without protocols or paths.
|
|
162
168
|
|
|
163
|
-
JavaScript
|
|
164
|
-
|
|
165
169
|
```javascript
|
|
166
170
|
posthog.init('<ph_project_token>', {
|
|
167
171
|
api_host: 'https://us.i.posthog.com',
|
|
@@ -176,14 +180,12 @@ Tracing headers help you attribute events across front and backend consistently.
|
|
|
176
180
|
|
|
177
181
|
## Capturing custom events, using feature flags, and more
|
|
178
182
|
|
|
179
|
-
Once you have PostHog initialized, there is a lot more you can do with it beyond autocapture, pageviews, and pageleaves. You can find the full details in our [JavaScript SDK docs](/docs/libraries/js/usage.md), but we'll cover a few examples here.
|
|
183
|
+
Once you have PostHog initialized, there is a lot more you can do with it beyond autocapture, pageviews, and pageleaves. You can find the full details in our [JavaScript SDK docs](https://posthog.com/docs/libraries/js/usage.md), but we'll cover a few examples here.
|
|
180
184
|
|
|
181
185
|
## Vue 3: Composition API
|
|
182
186
|
|
|
183
187
|
To capture custom events, evaluate feature flags, and use any of the other PostHog features, you can use the `posthog` object returned from the `usePostHog` composable like this:
|
|
184
188
|
|
|
185
|
-
JavaScript
|
|
186
|
-
|
|
187
189
|
```javascript
|
|
188
190
|
// src/App.vue
|
|
189
191
|
<script setup>
|
|
@@ -210,8 +212,6 @@ const handleClick = () => {
|
|
|
210
212
|
|
|
211
213
|
When using feature flags on pages that users navigate to directly, the flags may not be loaded when the component first renders. To ensure your UI updates reactively when flags load, create a composable that returns a reactive ref:
|
|
212
214
|
|
|
213
|
-
JavaScript
|
|
214
|
-
|
|
215
215
|
```javascript
|
|
216
216
|
// src/composables/usePostHogFeatureFlag.ts
|
|
217
217
|
import { ref, type Ref } from 'vue'
|
|
@@ -233,8 +233,6 @@ export function usePostHogFeatureFlag(
|
|
|
233
233
|
|
|
234
234
|
Then use it in your components:
|
|
235
235
|
|
|
236
|
-
JavaScript
|
|
237
|
-
|
|
238
236
|
```javascript
|
|
239
237
|
// src/App.vue
|
|
240
238
|
<script setup>
|
|
@@ -266,8 +264,6 @@ This ensures your component will automatically update when feature flags load, e
|
|
|
266
264
|
|
|
267
265
|
To capture custom events, evaluate feature flags, and use any of the other PostHog features, you can use the `$posthog` object returned from the plugin like this:
|
|
268
266
|
|
|
269
|
-
JavaScript
|
|
270
|
-
|
|
271
267
|
```javascript
|
|
272
268
|
// src/components/AboutPage.vue
|
|
273
269
|
<template>
|
|
@@ -299,23 +295,23 @@ export default {
|
|
|
299
295
|
</script>
|
|
300
296
|
```
|
|
301
297
|
|
|
302
|
-
Set up a reverse proxy (recommended)
|
|
298
|
+
**Set up a reverse proxy (recommended)**
|
|
303
299
|
|
|
304
|
-
We recommend [setting up a reverse proxy](/docs/advanced/proxy.md), so that events are less likely to be intercepted by tracking blockers.
|
|
300
|
+
We recommend [setting up a reverse proxy](https://posthog.com/docs/advanced/proxy.md), so that events are less likely to be intercepted by tracking blockers.
|
|
305
301
|
|
|
306
|
-
We have our [own managed reverse proxy service](/docs/advanced/proxy/managed-reverse-proxy.md), which is free for all PostHog Cloud users, routes through our infrastructure, and makes setting up your proxy easy.
|
|
302
|
+
We have our [own managed reverse proxy service](https://posthog.com/docs/advanced/proxy/managed-reverse-proxy.md), which is free for all PostHog Cloud users, routes through our infrastructure, and makes setting up your proxy easy.
|
|
307
303
|
|
|
308
|
-
If you don't want to use our managed service then there are several other options for creating a reverse proxy, including using [Cloudflare](/docs/advanced/proxy/cloudflare.md), [AWS Cloudfront](/docs/advanced/proxy/cloudfront.md), and [Vercel](/docs/advanced/proxy/vercel.md).
|
|
304
|
+
If you don't want to use our managed service then there are several other options for creating a reverse proxy, including using [Cloudflare](https://posthog.com/docs/advanced/proxy/cloudflare.md), [AWS Cloudfront](https://posthog.com/docs/advanced/proxy/cloudfront.md), and [Vercel](https://posthog.com/docs/advanced/proxy/vercel.md).
|
|
309
305
|
|
|
310
|
-
Grouping products in one project (recommended)
|
|
306
|
+
**Grouping products in one project (recommended)**
|
|
311
307
|
|
|
312
|
-
If you have multiple customer-facing products (e.g. a marketing website + mobile app + web app), it's best to install PostHog on them all and [group them in one project](/docs/settings/projects.md).
|
|
308
|
+
If you have multiple customer-facing products (e.g. a marketing website + mobile app + web app), it's best to install PostHog on them all and [group them in one project](https://posthog.com/docs/settings/projects.md).
|
|
313
309
|
|
|
314
310
|
This makes it possible to track users across their entire journey (e.g. from visiting your marketing website to signing up for your product), or how they use your product across multiple platforms.
|
|
315
311
|
|
|
316
|
-
Add IPs to Firewall/WAF allowlists (recommended)
|
|
312
|
+
**Add IPs to Firewall/WAF allowlists (recommended)**
|
|
317
313
|
|
|
318
|
-
For certain features like [heatmaps](/docs/toolbar/heatmaps.md), your Web Application Firewall (WAF) may be blocking PostHog's requests to your site. Add these IP addresses to your WAF allowlist or rules to let PostHog access your site.
|
|
314
|
+
For certain features like [heatmaps](https://posthog.com/docs/toolbar/heatmaps.md), your Web Application Firewall (WAF) may be blocking PostHog's requests to your site. Add these IP addresses to your WAF allowlist or rules to let PostHog access your site.
|
|
319
315
|
|
|
320
316
|
**EU**: `3.75.65.221`, `18.197.246.42`, `3.120.223.253`
|
|
321
317
|
|
|
@@ -325,23 +321,15 @@ These are public, stable IPs used by PostHog services.
|
|
|
325
321
|
|
|
326
322
|
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).
|
|
327
323
|
|
|
328
|
-
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).
|
|
324
|
+
An allowlist does not help when your app has a private address. For apps on an internal network, see [internal and intranet applications](https://posthog.com/docs/session-replay/troubleshooting.md#internal-and-intranet-applications).
|
|
329
325
|
|
|
330
326
|
## Next steps
|
|
331
327
|
|
|
332
|
-
For any technical questions for how to integrate specific PostHog features into Vue (such as analytics, feature flags, A/B testing, or surveys), have a look at our [JavaScript Web](/docs/libraries/js/usage.md) SDK docs.
|
|
328
|
+
For any technical questions for how to integrate specific PostHog features into Vue (such as analytics, feature flags, A/B testing, or surveys), have a look at our [JavaScript Web](https://posthog.com/docs/libraries/js/usage.md) SDK docs.
|
|
333
329
|
|
|
334
330
|
Alternatively, the following tutorials can help you get started:
|
|
335
331
|
|
|
336
|
-
- [How to set up analytics in Vue](/tutorials/vue-analytics.md)
|
|
337
|
-
- [How to set up feature flags in Vue](/tutorials/vue-feature-flags.md)
|
|
338
|
-
- [How to set up A/B tests in Vue](/tutorials/vue-ab-tests.md)
|
|
339
|
-
- [How to set up surveys in Vue](/tutorials/vue-surveys.md)
|
|
340
|
-
|
|
341
|
-
### Still have questions?
|
|
342
|
-
|
|
343
|
-
Ask PostHog AI
|
|
344
|
-
|
|
345
|
-
### Was this page useful?
|
|
346
|
-
|
|
347
|
-
HelpfulCould be better
|
|
332
|
+
- [How to set up analytics in Vue](https://posthog.com/tutorials/vue-analytics.md)
|
|
333
|
+
- [How to set up feature flags in Vue](https://posthog.com/tutorials/vue-feature-flags.md)
|
|
334
|
+
- [How to set up A/B tests in Vue](https://posthog.com/tutorials/vue-ab-tests.md)
|
|
335
|
+
- [How to set up surveys in Vue](https://posthog.com/tutorials/vue-surveys.md)
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
"neon-postgres",
|
|
112
112
|
"neon-postgres-branches",
|
|
113
113
|
"neon-postgres-egress-optimizer",
|
|
114
|
+
"neon-realtime",
|
|
114
115
|
"onboarding",
|
|
115
116
|
"plan-my-idea",
|
|
116
117
|
"publish-app",
|
|
@@ -152,5 +153,5 @@
|
|
|
152
153
|
"resources": [
|
|
153
154
|
"vybekiitReferences"
|
|
154
155
|
],
|
|
155
|
-
"count":
|
|
156
|
+
"count": 149
|
|
156
157
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mongodb-search-and-ai
|
|
3
3
|
description: |
|
|
4
|
-
|
|
4
|
+
Covers everything about search in MongoDB: Atlas Search (full-text), Vector Search (semantic), and Hybrid Search. Use this skill for ANY question about MongoDB search, including open-ended and explanatory ones asked before the user has any data or use case — 'how does search work in MongoDB?', 'I'm new to MongoDB search, where do I start?', 'what's the difference between Atlas Search and Vector Search?', 'which search type should I use?', 'what is vector search?', 'how does automated embedding work?', 'can you explain hybrid search?'. Do not answer these from general knowledge; use this skill. Also use to build search features: full-text queries, autocomplete, fuzzy matching, faceted search, semantic similarity, embeddings, RAG, text containment or substring matching ('contains', 'includes'), case-insensitive or multi-field text search, and filtering across many fields. Provides workflows for choosing a search type, creating indexes, writing queries, and optimizing performance via the MongoDB MCP server.
|
|
5
5
|
license: Apache-2.0
|
|
6
6
|
metadata:
|
|
7
7
|
version: "1.0.0"
|
|
@@ -10,19 +10,47 @@ disable-model-invocation: true
|
|
|
10
10
|
|
|
11
11
|
# MongoDB Search and AI Recommendations Skill
|
|
12
12
|
|
|
13
|
-
You are helping MongoDB users implement, optimize, and troubleshoot Atlas Search (lexical), Vector Search (semantic), and Hybrid Search (combined) solutions.
|
|
13
|
+
You are helping MongoDB users implement, optimize, and troubleshoot Atlas Search (lexical), Vector Search (semantic), and Hybrid Search (combined) solutions.
|
|
14
14
|
|
|
15
15
|
## Core Principles
|
|
16
16
|
|
|
17
17
|
1. **Understand before building** - Validate the use case to ensure you recommend the right solution
|
|
18
18
|
2. **Always inspect first** - Check existing indexes and schema before making recommendations
|
|
19
19
|
3. **Explain before executing** - Describe what indexes will be created and require explicit approval
|
|
20
|
-
4. **
|
|
21
|
-
5. **
|
|
22
|
-
6. **Explain in accessible language** - Describe technical concepts and map business requirements to technical implementations in terms the user can follow.
|
|
20
|
+
4. **Handle read-only scenarios** - Without `create`, `update`, or `delete` operation tools you are in read-only mode; hand the user index JSON to create themselves
|
|
21
|
+
5. **Explain in accessible language** - Describe technical concepts and map business requirements to technical implementations in terms the user can follow
|
|
23
22
|
|
|
24
23
|
## Workflow
|
|
25
24
|
|
|
25
|
+
### 0. Check for a Quickstart Request
|
|
26
|
+
|
|
27
|
+
`references/quick-start.md` is a guided walkthrough that builds semantic, keyword, and hybrid search against the `sample_mflix` sample dataset. It is a teaching tour, not a way to build search for the user's own data.
|
|
28
|
+
|
|
29
|
+
**Do not read `references/quick-start.md` until the user has chosen the tour.** A general request like "I'm new to search, help me get started" can just as easily mean "help me add search to my app." Use AskUserQuestion:
|
|
30
|
+
|
|
31
|
+
> "Two ways I can take this — which fits better?"
|
|
32
|
+
|
|
33
|
+
- **Guided tour on sample data** — we load Atlas's sample movie dataset and build semantic, keyword, and hybrid search on it step by step. Best for learning how each type works.
|
|
34
|
+
- **Build search for my own data** — tell me what you're searching and I'll design the indexes and queries for your collections.
|
|
35
|
+
|
|
36
|
+
Prompts that should trigger this offer, rather than being answered directly as a question:
|
|
37
|
+
|
|
38
|
+
- "I'm new to MongoDB, how does search work?", "help me get started with search"
|
|
39
|
+
- "what's the difference between Atlas Search and Vector Search?", "which search type should I use?"
|
|
40
|
+
- "I want to try vector search", "show me semantic search", "how does automated embedding work?"
|
|
41
|
+
- "I want to try keyword search", "show me full-text search", "I want to try hybrid search"
|
|
42
|
+
|
|
43
|
+
Skip the offer only when the intent is already unambiguous:
|
|
44
|
+
|
|
45
|
+
- **Explicit tour request** ("give me a guided tour", "walk me through search using sample data") — load `references/quick-start.md` and start at its Step 0.
|
|
46
|
+
- **The user has their own collection, data, or concrete use case** — use the Discovery Phase below, even when they name a single search type.
|
|
47
|
+
|
|
48
|
+
If the user named a specific search type, carry that into the walkthrough: it skips its own path question and routes straight to that path, after its prerequisite steps.
|
|
49
|
+
|
|
50
|
+
The walkthrough requires an Atlas cloud cluster — the sample dataset loads from the Atlas UI, and Automated Embedding works on every Atlas tier with no key management. Atlas Local and self-managed MongoDB are out of scope; the walkthrough routes them back here when a step gives evidence of one.
|
|
51
|
+
|
|
52
|
+
Otherwise, continue with the Discovery Phase.
|
|
53
|
+
|
|
26
54
|
### 1. Discovery Phase
|
|
27
55
|
|
|
28
56
|
**Check the environment:**
|
|
@@ -48,7 +76,7 @@ Common questions to ask:
|
|
|
48
76
|
|
|
49
77
|
### 2. Determine Search Type and Consult the Reference File
|
|
50
78
|
|
|
51
|
-
Match the use case to a search type below, then consult the linked reference file **before** recommending indexes or queries. Each reference file also documents the prerequisites you must verify first (cluster tier, MongoDB version, deployment
|
|
79
|
+
Match the use case to a search type below, then consult the linked reference file **before** recommending indexes or queries. Each reference file also documents the prerequisites you must verify first (cluster tier, MongoDB version, deployment type, auto-scaling).
|
|
52
80
|
|
|
53
81
|
**Atlas Search (Lexical/Full-Text):**
|
|
54
82
|
Use when users need:
|
|
@@ -70,7 +98,7 @@ Use when users need:
|
|
|
70
98
|
- Text data already stored in Atlas that they want to search by meaning
|
|
71
99
|
- RAG or AI agent memory with minimal setup
|
|
72
100
|
|
|
73
|
-
→ Consult `references/automated-embedding.md
|
|
101
|
+
→ Consult `references/automated-embedding.md`.
|
|
74
102
|
|
|
75
103
|
**Vector Search (Semantic, bring your own embeddings):**
|
|
76
104
|
Use when users need:
|
|
@@ -89,7 +117,7 @@ Use when users need:
|
|
|
89
117
|
- Results that factor in multiple relevance criteria
|
|
90
118
|
- Uses `$rankFusion` (rank-based) or `$scoreFusion` (score-based) to merge pipelines
|
|
91
119
|
|
|
92
|
-
→ Consult `references/hybrid-search.md
|
|
120
|
+
→ Consult `references/hybrid-search.md`, plus the lexical/vector files for the individual pipeline stages.
|
|
93
121
|
|
|
94
122
|
### 3. Execution and Validation
|
|
95
123
|
|
|
@@ -118,17 +146,7 @@ Use when users need:
|
|
|
118
146
|
|
|
119
147
|
## Handling Edge Cases
|
|
120
148
|
|
|
121
|
-
**
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
**Required field doesn't exist:**
|
|
126
|
-
- Explain what needs to be added and how (e.g., embedding field for vector search)
|
|
127
|
-
|
|
128
|
-
**Query fails or index missing:**
|
|
129
|
-
- Use `collection-indexes` to verify index exists
|
|
130
|
-
- If missing, explain index needs to be created first
|
|
131
|
-
|
|
132
|
-
**Multiple collections are relevant:**
|
|
133
|
-
- List options and ask which one they mean
|
|
134
|
-
- If context makes it obvious, confirm your assumption
|
|
149
|
+
- **Fields you can't find** — inspect available fields with `collection-schema`, then confirm the intended field with the user
|
|
150
|
+
- **A required field doesn't exist** — explain what to add and how (e.g., an embedding field for vector search)
|
|
151
|
+
- **Query fails or index missing** — verify with `collection-indexes`; if absent, the index must be created first
|
|
152
|
+
- **Multiple collections are relevant** — ask which one they mean, unless context makes it obvious
|
|
@@ -44,13 +44,16 @@ All models use Voyage AI, hosted and managed by MongoDB (multi-tenant, US region
|
|
|
44
44
|
| `voyage-4-lite` | High-volume, cost-sensitive applications | $0.00002 | $0.02 |
|
|
45
45
|
| `voyage-4` | **(Recommended)** General text search, balanced performance | $0.00006 | $0.06 |
|
|
46
46
|
| `voyage-4-large` | Maximum accuracy, complex semantic relationships | $0.00012 | $0.12 |
|
|
47
|
-
| `voyage-code-
|
|
47
|
+
| `voyage-code-4` | **(Recommended for code)** Code search, technical documentation | $0.00012 | $0.12 |
|
|
48
|
+
| `voyage-code-3` | Legacy code model — use `voyage-code-4` instead | $0.00018 | $0.18 |
|
|
48
49
|
|
|
49
50
|
**Decision guide:**
|
|
50
51
|
- Default / unknown use case → `voyage-4`
|
|
51
52
|
- Large collection, cost is a concern → `voyage-4-lite`
|
|
52
53
|
- High-stakes retrieval where accuracy matters most → `voyage-4-large`
|
|
53
|
-
- Codebase or technical docs search → `voyage-code-
|
|
54
|
+
- Codebase or technical docs search → `voyage-code-4`
|
|
55
|
+
|
|
56
|
+
**`voyage-code-4` requires an Atlas deployment.** On self-managed deployments, use `voyage-code-3` for code and technical documentation.
|
|
54
57
|
|
|
55
58
|
**Free tokens:** 200 million tokens per model, one-time, shared across the entire Atlas organization. Does not refresh. See [Billing and Free Tokens](#billing-and-free-tokens) below for how consumption and invoicing work.
|
|
56
59
|
|
|
@@ -327,6 +330,7 @@ No standard rate limits — uses a separate inference tier optimized for through
|
|
|
327
330
|
| `voyage-4-large` | 2,000 | 3,000,000 |
|
|
328
331
|
| `voyage-4` | 2,000 | 8,000,000 |
|
|
329
332
|
| `voyage-4-lite` | 2,000 | 16,000,000 |
|
|
333
|
+
| `voyage-code-4` | 2,000 | 3,000,000 |
|
|
330
334
|
| `voyage-code-3` | 2,000 | 3,000,000 |
|
|
331
335
|
|
|
332
336
|
**Best practice:** space out bulk insert/update operations rather than sending them all at once — batching avoids hitting these per-minute limits.
|
|
@@ -340,6 +344,7 @@ No standard rate limits — uses a separate inference tier optimized for through
|
|
|
340
344
|
| `voyage-4-large` | 3 | 2,000 |
|
|
341
345
|
| `voyage-4` | 3 | 2,000 |
|
|
342
346
|
| `voyage-4-lite` | 3 | 2,000 |
|
|
347
|
+
| `voyage-code-4` | 3 | 2,000 |
|
|
343
348
|
| `voyage-code-3` | 3 | 2,000 |
|
|
344
349
|
|
|
345
350
|
**Paid cluster (M0 with a payment method, Flex, or M10+ dedicated):**
|
|
@@ -349,6 +354,7 @@ No standard rate limits — uses a separate inference tier optimized for through
|
|
|
349
354
|
| `voyage-4-large` | 2,000 | 3,000,000 |
|
|
350
355
|
| `voyage-4` | 2,000 | 8,000,000 |
|
|
351
356
|
| `voyage-4-lite` | 2,000 | 16,000,000 |
|
|
357
|
+
| `voyage-code-4` | 2,000 | 3,000,000 |
|
|
352
358
|
| `voyage-code-3` | 2,000 | 3,000,000 |
|
|
353
359
|
|
|
354
360
|
Paid-tier limits increase automatically as usage grows over time — no action needed to benefit from that growth.
|