Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1e8c30

Browse filesBrowse files
committed
Added events
1 parent 0d56377 commit d1e8c30
Copy full SHA for d1e8c30

File tree

Expand file treeCollapse file tree

5 files changed

+16
-5
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+16
-5
lines changed

‎components/slack-button.tsx

Copy file name to clipboardExpand all lines: components/slack-button.tsx
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import slackGif from "../public/assets/slackanimation.gif";
44
export default function SlackButton({
55
text,
66
url,
7+
onClick,
78
}: {
89
text: string;
910
url: string;
11+
onClick?: () => void;
1012
}) {
1113
return (
1214
<a
15+
onClick={onClick}
1316
href={url}
1417
style={{
1518
fontFamily: "Lato, sans-serif",

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@next/font": "^13.1.6",
1313
"@tailwindcss/forms": "^0.5.2",
1414
"@upstash/redis": "^1.10.2",
15-
"@vercel/analytics": "^0.1.10",
15+
"@vercel/analytics": "^0.1.9-beta.6",
1616
"@vercel/og": "^0.1.0",
1717
"escape-string-regexp": "5.0.0",
1818
"framer-motion": "^9.0.7",

‎pages/index.tsx

Copy file name to clipboardExpand all lines: pages/index.tsx
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import SlackButton from "@/components/slack-button";
22
import Layout from "@/components/layout";
33
import { Play } from "lucide-react";
44
import { useVideoModal } from "@/components/video-modal";
5+
import va from "@vercel/analytics";
56

67
export default function Home() {
78
const { setShowVideoModal, VideoModal } = useVideoModal();
@@ -49,6 +50,7 @@ export default function Home() {
4950
</div>
5051
<div className="flex flex-col text-center space-y-2">
5152
<SlackButton
53+
onClick={() => va.track("Install Clicked")}
5254
text="Add to Slack"
5355
url={`https://slack.com/oauth/v2/authorize?scope=chat:write,chat:write.public,links:read,links:write,commands,team:read&client_id=${process.env.NEXT_PUBLIC_SLACK_CLIENT_ID}`}
5456
/>

‎pages/success/[[...teamId]].tsx

Copy file name to clipboardExpand all lines: pages/success/[[...teamId]].tsx
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ import SlackButton from "@/components/slack-button";
44
import Layout from "@/components/layout";
55
import { Play } from "lucide-react";
66
import { useVideoModal } from "@/components/video-modal";
7+
import va from "@vercel/analytics";
8+
import { useEffect } from "react";
79

810
export default function SuccessTeam(props: { teamId: string }) {
911
const { setShowVideoModal, VideoModal } = useVideoModal();
12+
useEffect(() => {
13+
va.track("Install Success", { teamId: props.teamId });
14+
}, [props.teamId]);
15+
1016
return (
1117
<Layout meta={{ title: "Installation Successful" }}>
1218
<VideoModal />

‎yarn.lock

Copy file name to clipboardExpand all lines: yarn.lock
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@
343343
dependencies:
344344
isomorphic-fetch "^3.0.0"
345345

346-
"@vercel/analytics@^0.1.10":
347-
version "0.1.10"
348-
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-0.1.10.tgz#772ab975f1226b6db9632568299ead173c21da7d"
349-
integrity sha512-jjJ8GzcPnQp0cMxpfYoUycMRBtDiaIeyVjZPiEPe99Dj1PdjMzAFYEASiV/hpNsXHkpcNYCveDFh6jnmh0YSDQ==
346+
"@vercel/analytics@^0.1.9-beta.6":
347+
version "0.1.9-beta.6"
348+
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-0.1.9-beta.6.tgz#8bba86eaa1e479523e79fc4c71f8955774b7e8cc"
349+
integrity sha512-83mHCRsx2BAWijgBd17BvVw2g9/FkRs+i1paGES3KRf5yB+aU8VadlxoEeP2wkiLCMxpZWxrzaGKdwkoKId0TQ==
350350

351351
"@vercel/og@^0.1.0":
352352
version "0.1.0"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.