mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-31 07:44:21 +00:00
feat: add PostHog analytics integration
- Add PostHog client configuration in ui/lib/posthog.ts - Integrate PostHog tracking in auth forms and provider workflows - Add PostHog dependencies (posthog-js and posthog-node) - Update Next.js config for PostHog integration - Add environment variables for PostHog configuration - Update changelog with PostHog integration entry
This commit is contained in:
1 parent
aa843b823c
commit
8a65efa441
9 files changed
+73
-5
No files matched your search
@@ -5,6 +5,7 @@ import { Icon } from "@iconify/react";
|
||||
import { Checkbox } from "@nextui-org/react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import posthog from "posthog-js";
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
@@ -145,6 +146,13 @@ export const TestConnectionForm = ({
|
||||
});
|
||||
} else {
|
||||
setIsRedirecting(true);
|
||||
// Capture PostHog event for successful cloud connection
|
||||
posthog.capture("cloud_connection_success", {
|
||||
provider_type: providerType,
|
||||
provider_alias: providerData.data.attributes.alias,
|
||||
scan_type: form.watch("runOnce") ? "single" : "scheduled",
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
router.push("/scans");
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user