Import analytics from 3rd-party provider (Matomo) into InvenioRDM instance.
Project description
README
CLI tool to retrieve and ingest analytics from a provider into current InvenioRDM instance.
For now, only Matomo is supported. If other provider added, slight refactor to support them will be planned.
Install
pip install invenio-analytics-importer
Usage
Retrieve analytics
pipenv run invenio analytics_importer retrieve [--views|--downloads] --from <YYYY-MM> --to <YYYY-MM> --output-dir <path>/<to>/<data>/
If neither --views nor --downloads is passed, views will be the default. If both are passed, the last one on the CLI will be chosen.
--from and --to are inclusive year-month dates.
This downloads analytics into files corresponding to each year-month. The structure of each file is e.g.,:
{
"2024-08-01": [
{
// 1 "raw" analytics entry from provider
// corresponding to 1 URL
},
// ...
],
"2024-08-02": [
// ...
],
// ...
}
Ingest
pipenv run invenio analytics_importer ingest [--views|--downloads] -f <analytics file 1> -f <analytics file 2> ...
Analytics files are of the shape described above, although there is no
requirements for 1 file to correspond to 1 month. However, there is an
assumption/requirement that each file's date (YYYY-MM-DD) in
"YYYY-MM-DD": [...analytics...] is unique across all files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file invenio_analytics_importer-0.2.0.tar.gz.
File metadata
- Download URL: invenio_analytics_importer-0.2.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b7ba736b7e91ded1062a5ce67112c63158b0460cf86e4ee0e60d290c012b7a8
|
|
| MD5 |
062a1000e70e16b2bc8cae5af4de9fb8
|
|
| BLAKE2b-256 |
4fd17d7da9f4bd27732ff4c423c4c9be5fbb92bdab7e625f9c9913e54ae5c281
|
Provenance
The following attestation bundles were made for invenio_analytics_importer-0.2.0.tar.gz:
Publisher:
publish-to-pypi.yml on galter-dmt/invenio-analytics-importer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
invenio_analytics_importer-0.2.0.tar.gz -
Subject digest:
0b7ba736b7e91ded1062a5ce67112c63158b0460cf86e4ee0e60d290c012b7a8 - Sigstore transparency entry: 607816834
- Sigstore integration time:
-
Permalink:
galter-dmt/invenio-analytics-importer@935f4f195f342ade1ab139d7672eb1e09114fbf9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/galter-dmt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@935f4f195f342ade1ab139d7672eb1e09114fbf9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file invenio_analytics_importer-0.2.0-py3-none-any.whl.
File metadata
- Download URL: invenio_analytics_importer-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
721017a37b5e7568f9c65cc05d9ef5dff8c661e4daec87c623bbefcd00b59839
|
|
| MD5 |
a63f1ad48bafee902dc2212bac6f5e34
|
|
| BLAKE2b-256 |
876f1ffe2b0fb264bbc543a7fcf5707c51fa6c2f96e929e34b65c7528705a37c
|
Provenance
The following attestation bundles were made for invenio_analytics_importer-0.2.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on galter-dmt/invenio-analytics-importer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
invenio_analytics_importer-0.2.0-py3-none-any.whl -
Subject digest:
721017a37b5e7568f9c65cc05d9ef5dff8c661e4daec87c623bbefcd00b59839 - Sigstore transparency entry: 607816840
- Sigstore integration time:
-
Permalink:
galter-dmt/invenio-analytics-importer@935f4f195f342ade1ab139d7672eb1e09114fbf9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/galter-dmt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@935f4f195f342ade1ab139d7672eb1e09114fbf9 -
Trigger Event:
push
-
Statement type: