{"id":15345879,"url":"https://github.com/niklasmerz/netlify-analytics-collector","last_synced_at":"2025-04-15T03:35:00.664Z","repository":{"id":46034913,"uuid":"302899592","full_name":"NiklasMerz/netlify-analytics-collector","owner":"NiklasMerz","description":"Github Action to export analytics data from Netlify","archived":false,"fork":false,"pushed_at":"2021-11-18T17:15:07.000Z","size":82,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T16:12:39.627Z","etag":null,"topics":["actions","hacktoberfest","netlify"],"latest_commit_sha":null,"homepage":"https://blog.merzlabs.com/posts/netlify-analytics-archive/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiklasMerz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["niklasmerz"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-10-10T12:43:18.000Z","updated_at":"2025-02-23T15:50:32.000Z","dependencies_parsed_at":"2023-01-05T04:49:29.686Z","dependency_job_id":null,"html_url":"https://github.com/NiklasMerz/netlify-analytics-collector","commit_stats":{"total_commits":51,"total_committers":3,"mean_commits":17.0,"dds":"0.039215686274509776","last_synced_commit":"7cac126b796a879c0fb0d50bf9db2514b50dc55c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fnetlify-analytics-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fnetlify-analytics-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fnetlify-analytics-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fnetlify-analytics-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiklasMerz","download_url":"https://codeload.github.com/NiklasMerz/netlify-analytics-collector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249002720,"owners_count":21196680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["actions","hacktoberfest","netlify"],"created_at":"2024-10-01T11:17:03.321Z","updated_at":"2025-04-15T03:35:00.648Z","avatar_url":"https://github.com/NiklasMerz.png","language":"JavaScript","funding_links":["https://github.com/sponsors/niklasmerz"],"categories":[],"sub_categories":[],"readme":"# Netlify Analytics Collector\n\n\u003e :warning: This tool uses an unofficial/unpublisehd API from Netlify. It may break any time!\n\n[Netlify Analytics](https://www.netlify.com/products/analytics/) is awesome but currently it only shows you data for the last 30 days. You can archive analytics into CSV files with this tool. It either runs with NodeJS locally or can be added to Github repos as a Github action that runs on a schedule.\n\nYou can find example workflows in [.github/workflows](.github/workflows).\n\n* `example.yml` is set to run every day just before midnight to create 1 a zip file with the analytics of the last 30 days and 2 adds the analytics for the current day to a Google Sheet.\n* `summary-release.yml` Is a workflow that runs on the first day of each month and creates a new release in the Github repo with an zip with CSV files of the analtics data from the past month.\n\nThese are the workflows I came up and you can probably built even cooler workflows. Let me know!\n\n## Setup\n\nYou need to setup some secrets either as secrets for actions or environment variables.\n\n* `NETLIFY_SITE` - You need the **API ID** of your Netlify site with analytics enabled. You can find it on your sites settings page.\n* `NETLIFY_TOKEN` - You need a personal access token for your Netlify account to login in. You can generate a token [here](https://app.netlify.com/user/applications/personal)\n  \n### For Google Sheets\n\nThe example workflow uses [this action](https://github.com/canonical-web-and-design/csv-to-google-spreadsheet) to update a Google Sheet every day. Please read there how to set the action if you need it.\n\n* `GOOGLE_SERVICE_ACCOUNT_EMAIL`\n* `GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY`\n* `GOOGLE_SPREADSHEET_ID`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasmerz%2Fnetlify-analytics-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklasmerz%2Fnetlify-analytics-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasmerz%2Fnetlify-analytics-collector/lists"}