Code Monkey home page Code Monkey logo

umami's People

Contributors

akashrajpurohit avatar andlil avatar atmonshi avatar bartoszhernas avatar be-ch avatar bilguun0203 avatar briancao avatar cywio avatar dependabot[bot] avatar franciscao633 avatar gnarlex avatar hugomd avatar kiprasmel avatar lemonawa avatar lnxd avatar mandaputtra avatar maxime-j avatar meirroth avatar mikecao avatar moltencoffee avatar nfn avatar ravelloh avatar rikodev avatar rohandebsarkar avatar rubjo avatar sammy-t avatar selcukusta avatar tairosonloa avatar winterrific avatar ym-project avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

umami's Issues

SameSite issue

Hi there, on Google Chrome here's what I am getting when trying to use umami:

A cookie associated with a cross-site resource at [redacted] was set without the `SameSite` attribute. 

It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`.

You can review cookies in developer tools under Application>Storage>Cookies and see more details at 

https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

Example website: https://nextjsnews.com

I believe we should explicitly set the SameSite attribute on the umami cookie, not sure which value, do you know? More at https://web.dev/samesite-cookies-explained/

Chrome version: 84.0.4147.125

Having issues importing mysql

Hi,

Having some issues importing mysql schema:
root@ubuntu:/opt/analytics# mysql -u analytics -p analytics < sql/schema.mysql.sql
Enter password:
ERROR 1064 (42000) at line 79: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9
image
Mysql version 8.0

Metrics & Pageviews take very long

I'm analyzing a relatively large website since Aug 21 and it already takes ages until the stats are loaded.

image

The metrics took 15.91s and the pageviews 19.68s to load. So after a week, it will take more than 30 seconds, which is way too long.

Tracking module

Would it be possible to transform current tracking script into an npm module?

I'd like to import it into my code base so I can set it up and use directly in the app code.

Sending events and page views on purely JS based websites would then be trivial.

It'd also not be prone to being blocked by */umami.js or similar rules.

The dockerfile is not working

When building with the docker command e.g. "docker build -t umami ." the build fails with the following output:

Sending build context to Docker daemon  398.6MB
Step 1/6 : FROM node:12.18-alpine
 ---> 18f4bc975732
Step 2/6 : COPY . /app
 ---> Using cache
 ---> 896210a0812b
Step 3/6 : WORKDIR /app
 ---> Using cache
 ---> 954f53a0f73a
Step 4/6 : RUN npm install && npm run build
 ---> Running in 186ecb95670c
audited 1410 packages in 6.377s

133 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities


> [email protected] build /app
> npm-run-all copy-db-schema build-db-client build-app


> [email protected] copy-db-schema /app
> node scripts/copy-db-schema.js

/app/scripts/copy-db-schema.js:5
const db = process.env.DATABASE_URL.split(':')[0];
                                    ^

TypeError: Cannot read property 'split' of undefined
    at Object.<anonymous> (/app/scripts/copy-db-schema.js:5:37)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] copy-db-schema: `node scripts/copy-db-schema.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] copy-db-schema script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-22T06_11_23_358Z-debug.log
ERROR: "copy-db-schema" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npm-run-all copy-db-schema build-db-client build-app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-22T06_11_23_384Z-debug.log
The command '/bin/sh -c npm install && npm run build' returned a non-zero code: 1

During the very first attempt to build the image did showed more output (failed to install husky) Don't know if that is related, here is a snippet from that build attempt:

Step 4/6 : RUN npm install && npm run build
 ---> Running in 643f34fdb6be
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated

> @prisma/[email protected] preinstall /app/node_modules/@prisma/cli
> node preinstall/index.js


> @prisma/[email protected] install /app/node_modules/@prisma/cli
> node download-build/index.js


> [email protected] install /app/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
[bcrypt] Success: "/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote

> [email protected] install /app/node_modules/husky
> node husky install

husky > Setting up git hooks
Cannot read property 'toString' of null
husky > Failed to install

> @ampproject/[email protected] postinstall /app/node_modules/@ampproject/toolbox-optimizer
> node lib/warmup.js

AMP OPTIMIZER Downloaded latest AMP runtime data.

But i haven't been able to reproduce that even with docker system prune -a and docker build --pull --no-cache -t umami .

[Roadmap] Real-time dashboard

Provide a real-time dashboard:

  • Polling for data
  • Show visitors as they come in
  • Show active urls being visited
  • Show real-time country highlights

dashboard error after adding new website

Hi, I am getting this error when I visit the dashboard after I have added a website. If I delete the website everything goes back to normal.

I am running this in a docker container so could this be a problem with the image?

docker file

FROM node:latest

COPY . /app
WORKDIR /app

RUN npm install \
 && npm run build-mysql-client \
 && npm run build

EXPOSE 3000
CMD ["npm", "start"]

error

PrismaClientKnownRequestError: Raw query failed. Code: `1305`. Message: `FUNCTION umami.date_trunc does not exist`
    at PrismaClientFetcher.request (/app/node_modules/@prisma/client/runtime/index.js:1:211077)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)
    at async module.exports.cmhW.__webpack_exports__.default (/app/.next/server/pages/api/website/[id]/pageviews.js:542:32)
    at async apiResolver (/app/node_modules/next/dist/next-server/server/api-utils.js:8:1)
    at async Server.handleApiRequest (/app/node_modules/next/dist/next-server/server/next-server.js:48:397)
    at async Object.fn (/app/node_modules/next/dist/next-server/server/next-server.js:40:218)
    at async Router.execute (/app/node_modules/next/dist/next-server/server/router.js:38:67)
    at async Server.run (/app/node_modules/next/dist/next-server/server/next-server.js:49:494)
    at async Server.handleRequest (/app/node_modules/next/dist/next-server/server/next-server.js:18:101) {
  code: 'P2010',
  meta: { code: '1305', message: 'FUNCTION umami.date_trunc does not exist' }
}

docker build log

[root@tyr umami]# docker build -t umami .
Sending build context to Docker daemon  1.508MB
Step 1/6 : FROM node:latest
latest: Pulling from library/node
419e7ae5bb1e: Pull complete 
848839e0cd3b: Pull complete 
de30e8b35015: Pull complete 
258fdea6ea48: Pull complete 
ddb75eb7f1e9: Pull complete 
7ec8a0667334: Pull complete 
c6d8dab5779d: Pull complete 
d3ae9be01b42: Pull complete 
38ff96b6f833: Pull complete 
Digest: sha256:8b6401f8d15c900736a54a870994277b3de19ebd28cc483c497bf00d608e2a90
Status: Downloaded newer image for node:latest
 ---> 784e696f5060
Step 2/6 : COPY . /app
 ---> 6a7293be4d29
Step 3/6 : WORKDIR /app
 ---> Running in 45926c6c0e66
Removing intermediate container 45926c6c0e66
 ---> 1f4edb969ff2
Step 4/6 : RUN npm install  && npm run build-mysql-client  && npm run build
 ---> Running in 4d722d03fcf0
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated

> @prisma/[email protected] preinstall /app/node_modules/@prisma/cli
> node preinstall/index.js


> @prisma/[email protected] install /app/node_modules/@prisma/cli
> node download-build/index.js


> [email protected] install /app/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
[bcrypt] Success: "/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote

> [email protected] install /app/node_modules/husky
> node husky install

husky > Setting up git hooks
Husky requires Git >=2.13.0. Got v2.11.0.
husky > Failed to install

> @ampproject/[email protected] postinstall /app/node_modules/@ampproject/toolbox-optimizer
> node lib/warmup.js

AMP OPTIMIZER Downloaded latest AMP runtime data.

> @prisma/[email protected] postinstall /app/node_modules/@prisma/client
> node scripts/postinstall.js

warning The postinstall script automatically ran `prisma generate` and did not find your `prisma/schema.prisma`.
If you have a Prisma Schema file in a custom path, you will need to run
`prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
If you do not have a Prisma Schema file yet, you can ignore this message.


> [email protected] postinstall /app/node_modules/geolite2-redist
> node scripts/postinstall.js

Downloading MaxMind databases from mirror...

> [email protected] postinstall /app/node_modules/husky
> opencollective-postinstall || exit 0

Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"14.8.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/webpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/rollup/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1389 packages from 653 contributors and audited 1394 packages in 28.682s

132 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities


> [email protected] build-mysql-client /app
> dotenv prisma generate -- --schema=./prisma/schema.mysql.prisma


✔ Generated Prisma Client to ./node_modules/@prisma/client in 52ms

You can now start using Prisma Client in your code:

import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()

Explore the full API: http://pris.ly/d/client

> [email protected] build /app
> next build

info  - Loaded env from /app/.env
info  - Creating an optimized production build...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

info  - Compiled successfully
info  - Collecting page data...
info  - Generating static pages (0/10)
info  - Generating static pages (1/10)
info  - Generating static pages (2/10)
info  - Generating static pages (3/10)
info  - Generating static pages (4/10)
info  - Generating static pages (5/10)
info  - Generating static pages (6/10)
info  - Generating static pages (7/10)
info  - Generating static pages (8/10)
info  - Generating static pages (9/10)
info  - Generating static pages (10/10)
info  - Finalizing page optimization...

Page                                                           Size     First Load JS
┌ ○ /                                                          270 B          69.7 kB
├   /_app                                                      0 B            69.4 kB
├ ○ /404                                                       311 B          83.3 kB
├ ○ /account                                                   300 B           108 kB
├   └ css/d6ce35f156ff7a395d80.css                             1.59 kB
├ λ /api/account                                               0 B            69.4 kB
├ λ /api/account/[id]                                          0 B            69.4 kB
├ λ /api/account/password                                      0 B            69.4 kB
├ λ /api/accounts                                              0 B            69.4 kB
├ λ /api/auth/login                                            0 B            69.4 kB
├ λ /api/auth/logout                                           0 B            69.4 kB
├ λ /api/auth/verify                                           0 B            69.4 kB
├ λ /api/collect                                               0 B            69.4 kB
├ λ /api/share/[id]                                            0 B            69.4 kB
├ λ /api/website                                               0 B            69.4 kB
├ λ /api/website/[id]                                          0 B            69.4 kB
├ λ /api/website/[id]/active                                   0 B            69.4 kB
├ λ /api/website/[id]/metrics                                  0 B            69.4 kB
├ λ /api/website/[id]/pageviews                                0 B            69.4 kB
├ λ /api/website/[id]/rankings                                 0 B            69.4 kB
├ λ /api/websites                                              0 B            69.4 kB
├ ○ /dashboard                                                 1.3 kB          269 kB
├   └ css/3863ae50099d5da20e76.css                             1.8 kB
├ ○ /login                                                     963 B           105 kB
├   └ css/83201af397b3b9674650.css                             1.33 kB
├ ○ /logout                                                    317 B          69.8 kB
├ ○ /settings                                                  4.84 kB         113 kB
├   └ css/2bde8e151308fa3094e9.css                             1.91 kB
├ ○ /share/[...id]                                             692 B           318 kB
├ ○ /test                                                      689 B          83.6 kB
└ ○ /website/[...id]                                           811 B           318 kB
+ First Load JS shared by all                                  69.4 kB
  ├ chunks/0328004b18dbca9d70f9be5bfa3108943c47d56c.1cd369.js  5.98 kB
  ├ chunks/500b5a1d2b643a4c391e5b5b5d3aac2b96523de3.078c38.js  4.82 kB
  ├ chunks/ed2584126e27a96ef798621a2b6886b4a721d4b7.e68a13.js  10 kB
  ├ chunks/framework.4cba9b.js                                 40.4 kB
  ├ chunks/main.0bf0ed.js                                      6.69 kB
  ├ chunks/pages/_app.312cc1.js                                747 B
  ├ chunks/webpack.ccf5ab.js                                   751 B
  └ css/919eb8d609481187f7f6.css                               6.54 kB

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)  automatically rendered as static HTML (uses no initial props)
●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
   (ISR)     incremental static regeneration (uses revalidate in getStaticProps)

Redirects

┌ source: /:path+/
├ destination: /:path+
└ permanent: true
 

Removing intermediate container 4d722d03fcf0
 ---> b993867a7910
Step 5/6 : EXPOSE 3000
 ---> Running in 2ad3eb6a290f
Removing intermediate container 2ad3eb6a290f
 ---> 73c32347972b
Step 6/6 : CMD ["npm", "start"]
 ---> Running in e99c976431ba
Removing intermediate container e99c976431ba
 ---> d1221032d1f1
Successfully built d1221032d1f1
Successfully tagged umami:latest

Versions, OS and fluff

Hey Man,

Project looks pretty awesome! Just having issues installing it.

Are you able to let me know the following:

  • Supported OS'
  • NPM version
  • mysql version (not too important)

as I am having some whack issues installing (log file attached hopefully) and I think, tho I am not sure, it seems to be an NPM issue or an OS related issue.

(Also, the demo site gets a 502)
2020-08-18T12_02_17_269Z-debug.log

I am running on a clean install of ubuntu 18.04

ubuntu@umami:~$ npm -v
6.14.8
ubuntu@umami:~$ node -v
v8.10.0
ubuntu@umami:~$ hostnamectl
   Static hostname: umami
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ab8c10e8c0f642ea8d8458e417d700f2
           Boot ID: 59aa74b39f004832ad40340a1b2c34bb
    Virtualization: xen
  Operating System: Ubuntu 18.04.5 LTS
            Kernel: Linux 4.15.0-112-generic
      Architecture: x86-64
ubuntu@umami:~$

i18n support.

Does this software support i18n? (Or do you plan to respond?)

Javascript Error

Hi there,

i just installed umami and set everything up. After adding the script in a website i get the following error:

TypeError: undefined is not an Object. (evaluating '"msTrackingProtectionEnabled"in window.external')

No tracking seems to happen.
Tested with Safari 13.1.2 and Brave on MacOS 10.15.6

Anything I can change to make it work?
Thx

DATABASE_URL should not be required to build Docker image

Hey 👋🏻 Love the project, thanks for building it!

The DATABASE_URL shouldn't be required at build time. Right now, if you're building a Docker image, you need to pass the DATABASE_URL in via a build argument, which is a bit awkward as your CI/CD infrastructure shouldn't require secrets.

As far as I can tell, the database URL is only required to determine whether we're using Postgres or MySQL, and to copy the appropriate Prisma schema, here:
https://github.com/mikecao/umami/blob/cc841ca734d300075614d86c1f4a6dae4b9b65d2/scripts/copy-db-schema.js#L5-L16

I propose the addition of a DATABASE_SCHEMA environment variable which the above script can use to determine the database schema type.

I'm happy to raise a PR for this ✌🏻

[Feature request] Opt-Out

Due to the legal situation (GDPR) in europe (especially in germany), we need a way to allow the user to opt out from umami, if there's no way to get rid of the cookie, that is being set upon the first visit.

https support?

currently it only load from http://.
please add https support.

I'm getting this when building

Using Windows.

Build error occurred
Error: Export encountered errors on following paths:
/
/404
/account
/dashboard
/login
/logout
/settings
/share/[...id]
/test
/website/[...id]
at exportApp (C:\Users\Saxon Brooker\Documents\website\web\website\umami\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\export\index.js:24:1103)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async build (C:\Users\Saxon Brooker\Documents\website\web\website\umami\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\index.js:37:212)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: next build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Provided script tag is invalid

The provided self-closing script tag is invalid HTML.

<script async defer data-website-id="[red]" src="[red]/umami.js" />

I put this in the head element of my HTML and rendering of my entire page broke. The browser interpreted it as only an open tag, so the remaining document was script.

Run through the W3C validator, it gives the following message:

Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag.

Provide a Docker image

A Docker image can be used to setup the app more easily and provides less hassles with the installation. It would be great to provide an image that includes the pre-built application.

Examples: Plausible Ackee

The bar graph is a little bit confusing.

In the bar chart, the unique visitors and the page views are stack on top of each other. So when both bar graphs shown, it makes it feels like the the page views are lot more than it is.

For example, I have 95 page views and 57 unique visitors. When both are shown, it feels like I have 152 page views.
9A98D2CA-B04C-4DC6-8A19-5800105DF4A2

[Roadmap] Events UI

Implement UI for events:

  • New UI components
  • Update docs on how to use events

dont escape non-ascii characters in database

if the url contains non-ascii characters , the path will be escaped.
such as :

你好

will be escaped to

%E4%BD%A0%E5%A5%BD

which is not user-friendly.

it would be great if original content of the url will be displayed.

Unable to login after installation

I followed https://umami.is/docs/login but the login credentials does not work.

I guess this is a bug, as I looked at the postgres insert script: https://github.com/mikecao/umami/blob/d3514cfc5f20966612c277a5885356fa220a5ddd/sql/schema.postgresql.sql#L72

It is hardcoded for the password hash there, it does not consider the SALT we chose in the config.
So this salt won't work with the hardcoded hash...

I did not validate this yet, but I guess this is the issue here

How does it work in Gridsome?

This is the tracking code script:
<script async defer data-website-id="xxx-yyy-zzz" src="http://localhost:3000/umami.js" />

This is what I've tried in my 'Index.vue' file in Gridsome:
<script>
export default {
metaInfo: {
title: "Home",
script: [{ async: true, defer: true, id: 'xxx-yyy-zzz', src: "http://localhost:3000/umami.js" }]
},
};
</script>

It does NOT work.

How do we change attribute 'id' to 'data-website-id'?
Is this even the right way?

docker-compose postgres error - no pg_hba.conf entry for host

Hello, thank you for great custom analytics tool. I wanted to boot it up using docker-compose, everything starts up just fine but when I try to login to default user account (admin/umami) I get following error

> [email protected] start /app
> next start

ready - started server on http://localhost:3000
PrismaClientUnknownRequestError: Error in connector: Error querying the database: db error: FATAL: no pg_hba.conf entry for host "192.168.122.1", user "umami", database "umami", SSL on
    at PrismaClientFetcher.request (/app/node_modules/@prisma/client/runtime/index.js:1:211253)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

I tried creating custom pg_hba.conf with host all all 0.0.0.0/0 trust and attached it to database container

db:
    volumes:
      ...
      - ./pg_hba.conf:/var/lib/postgresql/data/pg_hba.conf

but still no luck. I checked inside a running container and file is attached correctly.

You were added to awesome-humane-tech

This is just a FYI issue to notify that you were added to the curated awesome-humane-tech in the 'Analytics' category, and - if you like that - are now entitled to wear our badge:

Awesome Humane Tech

By adding this to the README:

[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)

https://github.com/humanetech-community/awesome-humane-tech

Consolidate same url into one?

Screen Shot 2020-08-21 at 21 56 43

In this screenshot, it's the same page.
It shouldn't be tracked separately.

  • with or without the "host", in my case https://snir.dev.
  • with different utm sources (or in the general case, and different hash?)

What I'm thinking about (I'd like to contribute this code myself):

  • For the "host" part, fix it in the tracking JS script. To consistently track without the host part.
  • For the utm and hash differences, add a column in the "pageviews" table for absolute_path, that will be without the hash differences, and present by it. (The definitive url will be used in the future for utm tracking or other things)

thoughts?

[Roadmap] Single prisma.schema file

Problem

I really don't like how the schema.prisma file is split between Postgresql and MySQL. It makes deploying to web hosts more difficult than it needs to be.

Solution

There should be a single build-db-client script that figures out your database based on your .env file and creates the appropriate schema file.

No Such File on npm build

After running through the setup when I get to npm build it errors with the below.

Tried running through the steps from scratch twice.

image

Documentation: Cookie Policy

Hi,

thanks for sharing this great project! Looks awesome!

However for the cookie policy we have to add the name of cookies the scripts set on a page. I've noticed the following cookie from unami on the page I've added the tracking javascript:

umami.auth

Does the script set any other cookie?

Unfortunately I do not find the max-age/expiration date for that cookie. May I ask you how long is the cookie stored?

From what I see I would say the following:

Cookie name: unami.auth
Max age: 1 day

Maybe a feature request: Add the option to rename that cookie to have a more custom way of using unami.

Thanks for making this ❤️

I've been debating rolling my own hacky solution for a while now - just needed some stats without stepping into the chasm that is google analytics - so this is just perfect for me.

Again, great stuff and thanks for putting this out in the open 🏆

An unexpected error has occurred.

Message from Front End: An unexpected error has occurred.

When a run SELECT * FROM events; in Postgresql this return an empty table.

Log from Front End:

17:51:22.925
TypeError: u is null
    NextJS 20
framework.4cba9b13ac7d2f11afcf.js:1:99659
    NextJS 22
17:51:22.926
TypeError: u is null
    NextJS 20
        we
        Gi
        Ua
        ko
        xu
        wu
        du
        Xl
        unstable_runWithPriority
        $l
        Xl
        Yl
        ou
        ga
        e
        h
        _invoke
        S
        r
        s

Log from Server:

info  - Loaded env from /var/www/umami/.env
ready - started server on http://localhost:3000
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at module.exports.RKDr.__webpack_exports__.default (/var/www/umami/.next/server/pages/api/website/[id]/metrics.js:523:24)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async apiResolver (/var/www/umami/node_modules/next/dist/next-server/server/api-utils.js:8:1)
    at async Server.handleApiRequest (/var/www/umami/node_modules/next/dist/next-server/server/next-server.js:48:397)
    at async Object.fn (/var/www/umami/node_modules/next/dist/next-server/server/next-server.js:40:218)
    at async Router.execute (/var/www/umami/node_modules/next/dist/next-server/server/router.js:38:67)
    at async Server.run (/var/www/umami/node_modules/next/dist/next-server/server/next-server.js:49:494)
    at async Server.handleRequest (/var/www/umami/node_modules/next/dist/next-server/server/next-server.js:18:101)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.