Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@socialgouv/matomo-postgres

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socialgouv/matomo-postgres

Extract visitor events from Matomo API and push to Postgres

  • 2.0.0
  • npm
  • Socket score

Version published
Weekly downloads
3.4K
increased by30.01%
Maintainers
2
Weekly downloads
 
Created
Source

@socialgouv/matomo-postgres

header

Extract matomo data from Live.getLastVisitsDetails API and push events and visits informations to Postgres.

Usage

Create the initial table database table then run the following job with correct environment variables.

npx @socialgouv/matomo-postgres

Environment variables Deployment

namevalue
MATOMO_KEY*matomo api token
MATOMO_SITE*matomo site id
MATOMO_URL*matomo url
PGDATABASE*Postgres connection string
DESTINATION_TABLEmatomo
STARTDATEdefault to today()
RESULTPERPAGEmatomo pagination (defaults to 500)
INITIAL_OFFSETHow many days to fetch on initialisation (defaults to 3)

Dev

docker-compose up
export MATOMO_URL=
export MATOMO_SITE=
export MATOMO_KEY=
export DESTINATION_TABLE= # optional
export STARTDATE= # optional
export OFFSET= # optional
export PGDATABASE=postgres://postgres:postgres@127.0.0.1:5455/postgres
yarn start

Use yarn test -u to update the snapshots

Database migrations

yarn migrate is run on each yarn start with Kysely migrations at ./src/migrations

FAQs

Package last updated on 21 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc