{"id":27210711,"url":"https://github.com/ganti/matomopythonlogimporter","last_synced_at":"2026-04-26T22:31:41.088Z","repository":{"id":45886699,"uuid":"421993490","full_name":"ganti/MatomoPythonLogImporter","owner":"ganti","description":"Import log files into Matomo without duplicates","archived":false,"fork":false,"pushed_at":"2021-11-29T19:22:50.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-01T20:20:54.589Z","etag":null,"topics":["analytics","bash-script","logfile-analysis","logfile-import","logfile-parser","matomo","piwik"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ganti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-27T22:38:35.000Z","updated_at":"2025-11-12T20:31:01.000Z","dependencies_parsed_at":"2022-09-10T17:01:02.798Z","dependency_job_id":null,"html_url":"https://github.com/ganti/MatomoPythonLogImporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ganti/MatomoPythonLogImporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganti%2FMatomoPythonLogImporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganti%2FMatomoPythonLogImporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganti%2FMatomoPythonLogImporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganti%2FMatomoPythonLogImporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganti","download_url":"https://codeload.github.com/ganti/MatomoPythonLogImporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganti%2FMatomoPythonLogImporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32315711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T21:09:39.134Z","status":"ssl_error","status_checked_at":"2026-04-26T21:09:21.240Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","bash-script","logfile-analysis","logfile-import","logfile-parser","matomo","piwik"],"created_at":"2025-04-10T01:15:15.570Z","updated_at":"2026-04-26T22:31:41.071Z","avatar_url":"https://github.com/ganti.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MatomoPythonLogImporter\nImport logfiles without duplicates\n\n[Matomo](https://matomo.org) is an open source web analytics tool, which is a self-hosted alternative to Google Analytics and allows anonymization of user data. \n\nThere are multiple ways to input data into Matomo: javascript in the browser, tracking pixel and the direct import of log files from the server (e.g. apache, nginx).\n\n## What does this tool\n\nTo import log files into Matomo, there is an import script [`import_logs.py`](https://matomo.org/docs/log-analytics-tool-how-to). \nUnfortunately there is one problem with this method: The import script just imports a logfile, but does not check if the data is allready in the Matomo Database. \nThis tool, is the link between your log files and `import_logs.py`\n\nMatomoPythonLogImporter checks if there is new data in the logfile, and only submits new data to Matomo.\n\n\n## Setup\n\n1. Copy this repository into the Matomo folder, e.g. `/matomo/MatomoPythonLogImporter`\n2. Edit the paths in [`config.sh`](https://github.com/ganti/MatomoPythonLogImporter/blob/main/config.sh)\n\n3. Edit [`config_matomo.config`](https://github.com/ganti/MatomoPythonLogImporter/blob/main/config_matomo.config)\nThe format should be `{logfilename}={MatomoSiteID}` . It is possibile to connect multiple log files to one Matomo [Site ID](https://matomo.org/faq/general/faq_19212/) \n\n4. Set up a cronjob:  \nThe following example runs the importer every 5 minutes\n```sh\n*/5 * * * * /usr/bin/sh […]/matomo/MatomoPythonLogImporter/log_importer.sh\n```\n\n## Closing remarks\nThis bash script ist pretty straight forward and it should be possible to adapt it fairly quickly to your webserver settings. It is highly recommended to create a test website in matomo, and run the script with one logfile, before addding all domains of your server.\n\nDo whatever you desire with this code. If you find a bug or have an improvement let me know in an issue or pull request\n\n### License\n[CC0 1.0 Universal  (CC0 1.0)  Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganti%2Fmatomopythonlogimporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganti%2Fmatomopythonlogimporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganti%2Fmatomopythonlogimporter/lists"}