feat: posthog version upgrade and added trackings (#24401)
* posthog version upgrade and calai banner tracking * disable posthog for EU * bunch more posthog tracking * Revert yarn.lock changes * add posthog package yarn changes * fix: add missing posthog import and fix lint warning in MemberInvitationModal Co-Authored-By: [email protected] <[email protected]> * fix: type check * cubic fixes * refactor * remove ui playground --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
42 files changed
+570
-271
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
import posthog from "posthog-js";
|
||||
|
||||
import { InstallAppButtonWithoutPlanCheck } from "@calcom/app-store/InstallAppButtonWithoutPlanCheck";
|
||||
import type { TDependencyData } from "@calcom/app-store/_appRegistry";
|
||||
@@ -44,6 +45,7 @@ const AppConnectionItem = (props: IAppConnectionItem) => {
|
||||
return (
|
||||
<div className="flex flex-row items-center justify-between p-5">
|
||||
<div className="flex items-center space-x-3">
|
||||
{/* eslint-disable @next/next/no-img-element */}
|
||||
<img src={logo} alt={title} className="h-8 w-8" />
|
||||
<p className="text-sm font-bold">{title}</p>
|
||||
{isDefault && <Badge variant="green">{t("default")}</Badge>}
|
||||
@@ -108,6 +110,12 @@ const AppConnectionItem = (props: IAppConnectionItem) => {
|
||||
) : undefined
|
||||
}
|
||||
onClick={(event) => {
|
||||
posthog.capture("onboarding_app_connect_clicked", {
|
||||
app_title: title,
|
||||
app_type: type,
|
||||
app_slug: slug,
|
||||
has_dependency: !!dependency,
|
||||
});
|
||||
// Save cookie key to return url step
|
||||
document.cookie = `return-to=${window.location.href};path=/;max-age=3600;SameSite=Lax`;
|
||||
buttonProps && buttonProps.onClick && buttonProps?.onClick(event);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useRef, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import posthog from "posthog-js";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { md } from "@calcom/lib/markdownIt";
|
||||
@@ -65,6 +66,8 @@ const UserProfile = ({ user }: UserProfileProps) => {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
posthog.capture("onboarding_completed");
|
||||
|
||||
await utils.viewer.me.get.refetch();
|
||||
const redirectUrl = localStorage.getItem("onBoardingRedirect");
|
||||
localStorage.removeItem("onBoardingRedirect");
|
||||
|
||||
Reference in new issue
Block a user