Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[analytics] add error field to feedback event #10455

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/dashboard/src/Analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
import Cookies from "js-cookie";
import { v4 } from "uuid";
import { Experiment } from "./experiments";
import { StartWorkspaceError } from "./start/StartPage";

export type Event =
| "invite_url_requested"
Expand Down Expand Up @@ -40,6 +41,8 @@ export interface TrackFeedback {
feedback: string;
href: string;
path: string;
error_object?: StartWorkspaceError;
error_message?: string;
}
interface TrackDashboardClick {
dnt?: boolean;
Expand Down
1 change: 1 addition & 0 deletions components/dashboard/src/components/ErrorMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function ErrorMessage(props: { imgSrc: string; imgAlt?: string; message: string
initialSize={24}
isError={true}
isModal={false}
error_message={props.message}
/>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ import happy from "../images/feedback/happy-emoji.svg";
import meh from "../images/feedback/meh-emoji.svg";
import crying from "../images/feedback/crying-emoji.svg";
import { trackEvent } from "../Analytics";
import { StartWorkspaceError } from "../start/StartPage";

function FeedbackComponent(props: {
onClose?: () => void;
isModal: boolean;
isError: boolean;
message?: string;
initialSize?: number;
error_object?: StartWorkspaceError;
error_message?: string;
}) {
const [text, setText] = useState<string>("");
const [selectedEmoji, setSelectedEmoji] = useState<number | undefined>();
Expand All @@ -35,6 +38,8 @@ function FeedbackComponent(props: {
feedback: text,
href: window.location.href,
path: window.location.pathname,
error_object: props.error_object || undefined,
error_message: props.error_message,
};
trackEvent("feedback_submitted", feedbackObj);
}
Expand Down
2 changes: 2 additions & 0 deletions components/dashboard/src/start/CreateWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ function RepositoryNotFoundView(p: { error: StartWorkspaceError }) {
message={"Was this error message helpful?"}
isError={true}
initialSize={24}
error_object={p.error}
error_message={p.error.message}
/>
)}
</StartPage>
Expand Down