Skip to content

Commit

Permalink
add open drawer event
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelRajodiya committed Aug 18, 2024
1 parent 1c46caf commit 71af846
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import OutlineDrawer from "../OutlineDrawer";
import { contentManager } from "@/lib/contentManager";
import Progressbar from "../Progressbar";
import NavBarMenu from "../NavBarMenus";
import { sendGAEvent } from "@next/third-parties/google";

export default function NavBar({ urlPath }: { urlPath: string }) {
const {
Expand Down Expand Up @@ -111,7 +112,12 @@ export default function NavBar({ urlPath }: { urlPath: string }) {
<NavBarMenu />
<button
className={styles.menuButton}
onClick={onOpen}
onClick={() => {
onOpen();
sendGAEvent("event", "buttonClicked", {
value: "Outline Drawer",
});
}}
ref={outlineBtnRef}
>
<OutlineMenuIcon colorMode={colorMode} />
Expand Down

0 comments on commit 71af846

Please sign in to comment.