Skip to content

Commit

Permalink
Matomo analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoistP committed Dec 19, 2024
1 parent 0ef7d1d commit 4c4271b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ BUILD_ENV=
COMMUNITY_API_KEY=
THEGRAPH_API_KEY=
REALTOKENAPI='https://api.realtoken.community/v1/token'
REALTOKENAPI_HISTORY='https://history.api.realtoken.community/'
REALTOKENAPI_HISTORY='https://history.api.realtoken.community/'

# Matomo analytics
MATOMO_URL='https://data.realtoken.community/'
# 1: prod
MATOMO_SITE_ID=1
2 changes: 2 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,7 @@ jobs:
COMMUNITY_API_KEY=${{ secrets.COMMUNITY_API_KEY }} \
REALTOKENAPI=https://api.realtoken.community/v1/token \
REALTOKENAPI_HISTORY=https://history.api.realtoken.community/ \
MATOMO_URL=https://data.realtoken.community/ \
MATOMO_SITE_ID=1 \
HOSTNAME=${{ github.ref_name == 'master' && 'dashboard.realtoken.community' || 'dashboard.${DOCKER_BRANCH}.realtoken.community' }} \
docker compose --project-name ${{ github.ref_name }}-dashboard --file docker-compose-branch.yml up -d'
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@ REALTOKENAPI='https://api.realtoken.community/v1/token'
REALTOKENAPI_HISTORY='https://history.api.realtoken.community/'
```

OPTIONAL:

```
MATOMO_URL=''
MATOMO_SITE_ID=''
```

To get a `COMMUNITY_API_KEY`, join the dedicated [telegram dev channel](https://t.me/+XQyoaFfmN61yk7X0) then ask for.

To get a THEGRAPH_API_KEY, you need to create an account on thegraph.com [Thegraph docs](https://thegraph.com/docs/en/querying/managing-api-keys/)

To get a MATOMO_URL and MATOMO_SITE_ID, you need to create an account on matomo.org [Matomo docs](https://fr.matomo.org/)

### Node.js version

<strong>📣 Node.js needed version is `v18.12.1`</strong>
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
- COMMUNITY_API_KEY=$COMMUNITY_API_KEY
- REALTOKENAPI=$REALTOKENAPI
- REALTOKENAPI_HISTORY=$REALTOKENAPI_HISTORY
- MATOMO_URL=$MATOMO_URL
- MATOMO_SITE_ID=$MATOMO_SITE_ID
networks:
- traefik-realt
labels:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@mantine/notifications": "^7.5.3",
"@realtoken/realt-commons": "1.4.6",
"@reduxjs/toolkit": "^2.2.1",
"@socialgouv/matomo-next": "^1.9.2",
"@tabler/icons": "^1.74.0",
"@web3-react/core": "^8.0.35-beta.0",
"cookies-next": "^2.0.5",
Expand Down

0 comments on commit 4c4271b

Please sign in to comment.