Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Add Dub tracking script

Richie McIlroyfee714e2c42b
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx
index b9417b6af..87bd717cb 100644
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@ -8,6 +8,7 @@ import type { Metadata } from "next";
import localFont from "next/font/local";
import { PropsWithChildren } from "react";
import { getBootstrapData } from "@/utils/getBootstrapData";
+import { Analytics as DubAnalytics } from "@dub/analytics/react";
import {
SessionProvider,
@@ -127,6 +128,11 @@ export default async function RootLayout({ children }: PropsWithChildren) {
</AuthContextProvider>
</PostHogProvider>
</TooltipPrimitive.Provider>
+ <DubAnalytics
+ domainsConfig={{
+ refer: "cap.link",
+ }}
+ />
</body>
</html>
);
diff --git a/apps/web/package.json b/apps/web/package.json
index c5d624306..0ca79cd2b 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -24,6 +24,7 @@
"@cap/utils": "workspace:*",
"@cap/web-api-contract": "workspace:*",
"@deepgram/sdk": "^3.3.4",
+ "@dub/analytics": "^0.0.27",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 253f32410..eccb528d4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -441,6 +441,9 @@ importers:
'@deepgram/sdk':
specifier: ^3.3.4
version: 3.13.0([email protected])
+ '@dub/analytics':
+ specifier: ^0.0.27
+ version: 0.0.27
'@fortawesome/free-brands-svg-icons':
specifier: ^6.7.2
version: 6.7.2
@@ -1704,6 +1707,9 @@ packages:
'@drizzle-team/[email protected]':
resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==}
+ resolution: {integrity: sha512-TbLr+sKWiBsMw1GOLpduZI7skXmrLwZlEoVoHyxq66RvMk/5Fl84QoenlhjdxaX1rlHAkWCcjcbAYcCN7skoKw==}
+
'@effect-ts/[email protected]':
resolution: {integrity: sha512-qi1WrtJA90XLMnj2hnUszW9Sx4dXP03ZJtCc5DiUBIOhF4Vw7plfb65/bdBySPoC9s7zy995TdUX1XBSxUkl5w==}
@@ -5367,11 +5373,11 @@ packages:
react-dom:
optional: true
- '@storybook/[email protected]':
- resolution: {integrity: sha512-Ka0ZeQTAgbZlbmlX5xbFPY5RyL7q5ijFhUJ/8keRVo3vJgScQbe7eSsJseod6U46enufIvnpqa1Oadx7y4julA==}
+ '@storybook/[email protected]':
+ resolution: {integrity: sha512-oJef0knEgf3hfWFaROE/2pA84fB+g7MJ1iBrYS8lBcnD577tMcsyEhfKMXzgHKjxh1pWDe4V/FS9tauj4I6MMA==}
peerDependencies:
- storybook: ^9.1.0-alpha.6
- vite: ^5.0.0 || ^6.0.0
+ storybook: ^9.1.0-alpha.7
+ vite: ^5.0.0 || ^6.0.0 || ^7.0.0
'@storybook/[email protected]':
resolution: {integrity: sha512-t+ZuDzAlsXKa6tLxNZT81gEAt4GNwsKP/Id2wluhmUWD/lwYW0uum1JiPUuanw8xD6TdakCW/7ULZc7aQUBLCQ==}
@@ -5386,10 +5392,10 @@ packages:
peerDependencies:
storybook: ^8.6.12
- '@storybook/[email protected]':
- resolution: {integrity: sha512-aP/lvZj9cxyVdLt2vBHL2GKti3koqKT49pe76NEcYqs/BmVEFal+vnquqmMsQtcXcauIf/jZ1Ibdc5NG5xR7NQ==}
+ '@storybook/[email protected]':
+ resolution: {integrity: sha512-QlTREydC6q8qHMlbY9NsrFJ39Aas6vHpxroooN87MTZ/ieuWC2pbBuliO4AGMvR5ym/7tOp7FvE2alj30/T9iQ==}
peerDependencies:
- storybook: ^9.1.0-alpha.6
+ storybook: ^9.1.0-alpha.7
'@storybook/[email protected]':
resolution: {integrity: sha512-bOmTNJE4FM6+3/1hPQVgha8cLxX2Nyi/4Z+tYq0pCDEyQqGRTD2KXre9XsSCnziRaGxiW80OrKkmqWY8Otuu4A==}
@@ -6265,6 +6271,7 @@ packages:
'@vercel/[email protected]':
resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==}
+ deprecated: This package is deprecated. You should to use `@vercel/functions` instead.
'@vercel/[email protected]':
resolution: {integrity: sha512-FG6H5YkP4bdw9Ll1qhmbxuE8KwW2E/g8fJpM183fWQLeVDGqzeywMIeJ9h2txdWZ03psgWMn6QymTxaDLmdwUg==}
@@ -14508,6 +14515,10 @@ snapshots:
'@drizzle-team/[email protected]': {}
+ dependencies:
+ server-only: 0.0.1
+
'@effect-ts/[email protected]':
dependencies:
'@effect-ts/system': 0.57.5
@@ -18278,9 +18289,9 @@ snapshots:
react: 19.1.0
react-dom: 19.1.0([email protected])
dependencies:
- '@storybook/csf-plugin': 9.1.0-alpha.6([email protected]([email protected]))
+ '@storybook/csf-plugin': 9.1.0-alpha.7([email protected]([email protected]))
storybook: 8.6.12([email protected])
ts-dedent: 2.2.0
@@ -18311,7 +18322,7 @@ snapshots:
storybook: 8.6.12([email protected])
unplugin: 1.16.1
dependencies:
storybook: 8.6.12([email protected])
unplugin: 1.16.1
@@ -21289,7 +21300,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.10.1([email protected])([email protected])
+ eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])
eslint-plugin-jsx-a11y: 6.10.2([email protected])
eslint-plugin-react: 7.37.5([email protected])
eslint-plugin-react-hooks: 4.6.2([email protected])
@@ -21308,7 +21319,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.10.1([email protected]([email protected]))([email protected])
eslint-plugin-jsx-a11y: 6.10.2([email protected])
eslint-plugin-react: 7.37.5([email protected])
eslint-plugin-react-hooks: 4.6.2([email protected])
@@ -21347,7 +21358,7 @@ snapshots:
tinyglobby: 0.2.13
unrs-resolver: 1.7.2
optionalDependencies:
transitivePeerDependencies:
- supports-color
@@ -21399,7 +21410,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.8
@@ -21428,7 +21439,7 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.8
@@ -26399,7 +26410,7 @@ snapshots:
dependencies:
'@storybook/types': 9.0.0-alpha.1([email protected]([email protected]))
magic-string: 0.30.17
solid-js: 1.9.6