mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 15:28:42 +00:00
Add telemetry to frontend
This commit is contained in:
@@ -7,6 +7,7 @@ import { publicPaths } from "../const.js";
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { initPostHog } from "../components/analytics/posthog";
|
||||
import { ENV } from "../components/utilities/config";
|
||||
|
||||
config.autoAddCss = false;
|
||||
|
||||
@@ -20,7 +21,7 @@ const App = ({ Component, pageProps, ...appProps }) => {
|
||||
|
||||
const handleRouteChange = () => {
|
||||
if (typeof window !== "undefined") {
|
||||
if (process.env.NEXT_PUBLIC_ENV == "production") {
|
||||
if (ENV == "production") {
|
||||
posthog.capture("$pageview");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import Plan from "../../../components/billing/Plan";
|
||||
import getOrganizationSubscriptions from "../../api/organization/GetOrgSubscription"
|
||||
import getOrganizationUsers from "../../api/organization/GetOrgUsers"
|
||||
import NavHeader from "../../../components/navigation/NavHeader";
|
||||
import { STRIPE_PRODUCT_PRO, STRIPE_PRODUCT_STARTER } from "../../../components/utilities/config";
|
||||
|
||||
|
||||
export default function SettingsBilling() {
|
||||
@@ -20,7 +21,7 @@ export default function SettingsBilling() {
|
||||
subtext: "$5 per member/month afterwards.",
|
||||
buttonTextMain: "Downgrade",
|
||||
buttonTextSecondary: "Learn More",
|
||||
current: currentPlan == process.env.NEXT_PUBLIC_STRIPE_PRODUCT_STARTER,
|
||||
current: currentPlan == STRIPE_PRODUCT_STARTER,
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
@@ -31,7 +32,7 @@ export default function SettingsBilling() {
|
||||
text: "Keep up with key management as you grow.",
|
||||
buttonTextMain: "Upgrade",
|
||||
buttonTextSecondary: "Learn More",
|
||||
current: currentPlan == process.env.NEXT_PUBLIC_STRIPE_PRODUCT_PRO,
|
||||
current: currentPlan == STRIPE_PRODUCT_PRO,
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
|
||||
Reference in New Issue
Block a user