Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fixed UTM query. Fixed types.
Mike Caob873ea38ea3c
diff --git a/.gitignore b/.gitignoreindex 8f39d0f10..b11f45093 100644--- a/.gitignore+++ b/.gitignore@@ -22,6 +22,7 @@ node_modules# misc.DS_Store.idea+.yarn*.iml*.log.vscodediff --git a/package.json b/package.jsonindex 79788bcd6..03f0f79aa 100644--- a/package.json+++ b/package.json@@ -69,7 +69,7 @@"@prisma/client": "5.10.2","@prisma/extension-read-replicas": "^0.3.0","@react-spring/web": "^9.7.3",- "@tanstack/react-query": "^5.12.2",+ "@tanstack/react-query": "^5.28.6","@umami/prisma-client": "^0.14.0","@umami/redis-client": "^0.18.0","chalk": "^4.1.1",@@ -176,6 +176,6 @@"tar": "^6.1.2","ts-jest": "^29.1.2","ts-node": "^10.9.1",- "typescript": "^5.1.6"+ "typescript": "^5.4.3"}}diff --git a/src/components/hooks/queries/useFilterQuery.ts b/src/components/hooks/queries/useFilterQuery.tsindex e51d70a1a..1ac6564ba 100644--- a/src/components/hooks/queries/useFilterQuery.ts+++ b/src/components/hooks/queries/useFilterQuery.ts@@ -7,7 +7,7 @@ export function useFilterQuery<T = any>({queryKey,queryFn,...options-}: UseQueryOptions): FilterQueryResult<T> {+}: Omit<UseQueryOptions, 'queryFn'> & { queryFn: (params?: object) => any }): FilterQueryResult<T> {const [params, setParams] = useState<T | SearchFilter>({query: '',page: 1,diff --git a/src/queries/analytics/reports/getUTM.ts b/src/queries/analytics/reports/getUTM.tsindex 289136c2c..f30c1c8a1 100644--- a/src/queries/analytics/reports/getUTM.ts+++ b/src/queries/analytics/reports/getUTM.ts@@ -45,6 +45,7 @@ async function relationalQuery(where website_id = {{websiteId::uuid}}and created_at between {{startDate}} and {{endDate}}and url_query is not null+ and event_type = 1group by 1`,{@@ -83,6 +84,7 @@ async function clickhouseQuery(where website_id = {websiteId:UUID}and created_at between {startDate:DateTime64} and {endDate:DateTime64}and url_query != ''+ and event_type = 1group by 1`,{diff --git a/yarn.lock b/yarn.lockindex 55199fe0c..7a3bd9ba5 100644--- a/yarn.lock+++ b/yarn.lock@@ -2718,17 +2718,17 @@dependencies:tslib "^2.4.0"-"@tanstack/[email protected]":- version "5.25.0"- resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.25.0.tgz#e08ed0a9fad34c8005d1a282e57280031ac50cdc"- integrity sha512-vlobHP64HTuSE68lWF1mEhwSRC5Q7gaT+a/m9S+ItuN+ruSOxe1rFnR9j0ACWQ314BPhBEVKfBQ6mHL0OWfdbQ==+"@tanstack/[email protected]":+ version "5.28.6"+ resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.28.6.tgz#a3bdb108f9f8d4e2ba3163068dbe6ff55b905a81"+ integrity sha512-hnhotV+DnQtvtR3jPvbQMPNMW4KEK0J4k7c609zJ8muiNknm+yoDyMHmxTWM5ZnlZpsz0zOxYFr+mzRJNHWJsA==-"@tanstack/react-query@^5.12.2":- version "5.25.0"- resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.25.0.tgz#f4dac794cf10dd956aa56dbbdf67049a5ba2669d"- integrity sha512-u+n5R7mLO7RmeiIonpaCRVXNRWtZEef/aVZ/XGWRPa7trBIvGtzlfo0Ah7ZtnTYfrKEVwnZ/tzRCBcoiqJ/tFw==+"@tanstack/react-query@^5.28.6":+ version "5.28.6"+ resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.28.6.tgz#0d52b0a98a1d842debf9c65496e20a9981a23bc4"+ integrity sha512-/DdYuDBSsA21Qbcder1R8Cr/3Nx0ZnA2lgtqKsLMvov8wL4+g0HBz/gWYZPlIsof7iyfQafyhg4wUVUsS3vWZw==dependencies:- "@tanstack/query-core" "5.25.0"+ "@tanstack/query-core" "5.28.6""@trysound/[email protected]":version "0.2.0"@@ -10354,7 +10354,16 @@ string-length@^4.0.1:char-regex "^1.0.2"strip-ansi "^6.0.0"-"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:+"string-width-cjs@npm:string-width@^4.2.0":+ version "4.2.3"+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==+ dependencies:+ emoji-regex "^8.0.0"+ is-fullwidth-code-point "^3.0.0"+ strip-ansi "^6.0.1"++string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:version "4.2.3"resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==@@ -10430,7 +10439,14 @@ string_decoder@^1.1.1:dependencies:safe-buffer "~5.2.0"-"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:+"strip-ansi-cjs@npm:strip-ansi@^6.0.1":+ version "6.0.1"+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==+ dependencies:+ ansi-regex "^5.0.1"++strip-ansi@^6.0.0, strip-ansi@^6.0.1:version "6.0.1"resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==@@ -11024,10 +11040,10 @@ typescript@^4.0, typescript@^4.5:resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==-typescript@^5.1.6:- version "5.4.2"- resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372"- integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==+typescript@^5.4.3:+ version "5.4.3"+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff"+ integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==ufo@^1.0.0, ufo@^1.2.0, ufo@^1.3.0, ufo@^1.3.1, ufo@^1.3.2:version "1.3.2"@@ -11333,7 +11349,7 @@ which@^2.0.1:dependencies:isexe "^2.0.0"-"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":version "7.0.0"resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==@@ -11351,6 +11367,15 @@ wrap-ansi@^6.2.0:string-width "^4.1.0"strip-ansi "^6.0.0"+wrap-ansi@^7.0.0:+ version "7.0.0"+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==+ dependencies:+ ansi-styles "^4.0.0"+ string-width "^4.1.0"+ strip-ansi "^6.0.0"+wrap-ansi@^8.0.1, wrap-ansi@^8.1.0:version "8.1.0"resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"