feat: Update @dub/analytics to support domainsConfig.refer (#20495)

* Update `@dub/analytics` to support domainsConfig.refer

* add reverse proxy

---------

Co-authored-by: Amit Sharma <[email protected]>
Co-authored-by: Tushar Bhatt <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-04-03 16:32:58 -04:00
1 parent 0465c639e6
commit 6bc040b7bb
4 files changed
+15 -6

No files matched your search

+4
View File
@@ -317,9 +317,13 @@ export default function Signup({
</>
)}
<DubAnalytics
apiHost="/_proxy/dub"
cookieOptions={{
domain: isENVDev ? undefined : `.${new URL(WEBSITE_URL).hostname}`,
}}
domainsConfig={{
refer: "refer.cal.com",
}}
/>
</>
) : null}
+5
View File
@@ -391,6 +391,11 @@ const nextConfig = {
source: "/icons/sprite.svg",
destination: `${process.env.NEXT_PUBLIC_WEBAPP_URL}/icons/sprite.svg`,
},
// for @dub/analytics, @see: https://d.to/reverse-proxy
{
source: "/_proxy/dub/track/:path",
destination: "https://api.dub.co/track/:path",
},
// When updating this also update pagesAndRewritePaths.js
...[
+1 -1
View File
@@ -44,7 +44,7 @@
"@calcom/ui": "*",
"@daily-co/daily-js": "^0.76.0",
"@daily-co/daily-react": "^0.22.0",
"@dub/analytics": "^0.0.15",
"@dub/analytics": "^0.0.27",
"@dub/embed-core": "^0.0.10",
"@dub/embed-react": "^0.0.10",
"@formkit/auto-animate": "1.0.0-beta.5",