UNPKG

@posthog/wizard

Version:

The PostHog wizard helps you to configure your project

61 lines (60 loc) 4.53 kB
import type { WizardOptions } from '../utils/types'; import { Integration } from './constants'; export declare const INTEGRATION_CONFIG: { readonly nextjs: { readonly name: "Next.js"; readonly filterPatterns: ["**/*.{tsx,ts,jsx,js,mjs,cjs}"]; readonly ignorePatterns: ["node_modules", "dist", "build", "public", "static", "next-env.d.*"]; readonly detect: (options: Pick<WizardOptions, "installDir">) => Promise<boolean>; readonly generateFilesRules: ""; readonly filterFilesRules: ""; readonly docsUrl: "https://posthog.com/docs/libraries/next-js"; readonly defaultChanges: "• Installed posthog-js & posthog-node packages\n• Initialized PostHog and added pageview tracking\n• Created a PostHogClient to use PostHog server-side\n• Setup a reverse proxy to avoid ad blockers blocking analytics requests"; readonly nextSteps: "• Call posthog.identify() when a user signs into your app\n• Call posthog.capture() to capture custom events in your app"; }; readonly react: { readonly name: "React"; readonly filterPatterns: ["**/*.{tsx,ts,jsx,js}"]; readonly ignorePatterns: ["node_modules", "dist", "build", "public", "static", "assets"]; readonly detect: (options: Pick<WizardOptions, "installDir">) => Promise<boolean>; readonly generateFilesRules: ""; readonly filterFilesRules: ""; readonly docsUrl: "https://posthog.com/docs/libraries/react"; readonly defaultChanges: "• Installed posthog-js package\n• Added PostHogProvider to the root of the app, to initialize PostHog and enable autocapture"; readonly nextSteps: "• Call posthog.identify() when a user signs into your app\n• Call posthog.capture() to capture custom events in your app"; }; readonly svelte: { readonly name: "Svelte"; readonly filterPatterns: ["**/*.{svelte,ts,js,jsx,tsx}"]; readonly ignorePatterns: ["node_modules", "dist", "build", "public", "static"]; readonly detect: (options: Pick<WizardOptions, "installDir">) => Promise<boolean>; readonly generateFilesRules: ""; readonly filterFilesRules: ""; readonly docsUrl: "https://posthog.com/docs/libraries/svelte"; readonly defaultChanges: "• Installed posthog-js & posthog-node packages\n• Added PostHog initialization to your Svelte app\n• Setup pageview & pageleave tracking\n• Setup event auto - capture to capture events as users interact with your app\n• Added a getPostHogClient() function to use PostHog server-side"; readonly nextSteps: "• Call posthog.identify() when a user signs into your app\n• Use getPostHogClient() to start capturing events server - side"; }; readonly "react-native": { readonly name: "React Native"; readonly filterPatterns: ["**/*.{ts,js,jsx,tsx}"]; readonly ignorePatterns: ["node_modules", "dist", "build", "public", "static"]; readonly detect: (options: Pick<WizardOptions, "installDir">) => Promise<boolean>; readonly generateFilesRules: ""; readonly filterFilesRules: ""; readonly docsUrl: "https://posthog.com/docs/libraries/react-native"; readonly defaultChanges: "• Installed required packages\n• Added PostHogProvider to the root of the app\n• Enabled autocapture and session replay"; readonly nextSteps: "• Call posthog.identify() when a user signs into your app\n• Call posthog.capture() to capture custom events in your app"; }; readonly astro: { readonly name: "Astro"; readonly filterPatterns: ["**/*.{astro,ts,js,jsx,tsx}"]; readonly ignorePatterns: ["node_modules", "dist", "build", "public", "static"]; readonly detect: (options: Pick<WizardOptions, "installDir">) => Promise<boolean>; readonly generateFilesRules: ""; readonly filterFilesRules: ""; readonly docsUrl: "https://posthog.com/docs/libraries/js"; readonly defaultChanges: "• Added PostHog component with initialization script\n• Created PostHogLayout for consistent analytics tracking"; readonly nextSteps: "• Call posthog.identify() when a user signs into your app\n• Call posthog.capture() to capture custom events in your app\n• Use posthog.isFeatureEnabled() for feature flags"; }; }; export declare const INTEGRATION_ORDER: readonly [Integration.nextjs, Integration.astro, Integration.svelte, Integration.reactNative, Integration.react];