{"id":39390598,"url":"https://github.com/eyyminda/ab-analytics","last_synced_at":"2026-01-18T03:11:06.237Z","repository":{"id":200051235,"uuid":"682051847","full_name":"eyyMinda/AB-Analytics","owner":"eyyMinda","description":"Initial Steps towards a custom A/B Testing platform using data from Google Analytics.","archived":false,"fork":false,"pushed_at":"2024-05-13T08:28:46.000Z","size":833,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-13T09:44:17.670Z","etag":null,"topics":["ab-testing","expressjs","google-analytics-4","google-cloud","reactjs","vite"],"latest_commit_sha":null,"homepage":"https://ab-analytics.vercel.app","language":"JavaScript","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/eyyMinda.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-23T10:34:07.000Z","updated_at":"2024-05-13T08:28:47.000Z","dependencies_parsed_at":"2023-10-15T13:26:59.372Z","dependency_job_id":"653b4419-ab79-4237-9b51-6e61b6b9621d","html_url":"https://github.com/eyyMinda/AB-Analytics","commit_stats":{"total_commits":13,"total_committers":3,"mean_commits":4.333333333333333,"dds":"0.23076923076923073","last_synced_commit":"e550de07351c4bf90e0cb0cbabc545a03a3f47d7"},"previous_names":["eyyminda/ab-analytics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eyyMinda/AB-Analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyyMinda%2FAB-Analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyyMinda%2FAB-Analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyyMinda%2FAB-Analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyyMinda%2FAB-Analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyyMinda","download_url":"https://codeload.github.com/eyyMinda/AB-Analytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyyMinda%2FAB-Analytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ab-testing","expressjs","google-analytics-4","google-cloud","reactjs","vite"],"created_at":"2026-01-18T03:11:02.042Z","updated_at":"2026-01-18T03:11:06.229Z","avatar_url":"https://github.com/eyyMinda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React + Vite + Express\n\nMinimal setup for a custom A/B testing application using Google Cloud and data from Google Analytics.\n\n## Preview\n\n![Preview](public/Preview.png)\n\n## Usage\n\n- Select a start date, end date, and metric from the form.\n- Click the \"Fetch\" button to retrieve data from Google Analytics.\n- The table will display the data for the selected date range and metric, grouped by country.\n- The sum total of the chosen metric is displayed in a separate box.\n\n## Google Cloud + GA Setup\n\n### Google Analytics Property ID:\n\n- Select your project at https://analytics.google.com\n- Go to Settings, Property Settings\n\n![property-id](zzzGuide/propertyID.png)\n\n- You'll see the ID there\n\n### Create Google Cloud Credentials and Enable API (Google Analytics Data API)\n\n- Navigate to API's \u0026 Services, Credentials\n\n![api-credentials](zzzGuide/api-credentials.png)\n\n- Create Credentials (OAuth)\n\n![create-credentials](zzzGuide/createOAuth.png)\n\n- Enter url's that you're using for your application server (vite uses 5173 by default)\n\n![urls](zzzGuide/oauthURLs.png)\n\n#### Quickstart Guide - https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries#node.js\n\n#### Generate Credentials JSON - https://developers.google.com/workspace/guides/create-credentials#create_credentials_for_a_service_account\n\n## ENV\n\n### Create a .env file in the project root directory and populate it with the following variables:\n\n```\nPROPERTY_ID=YOUR_GOOGLE_ANALYTICS_PROPERTY_ID\nPORT=3000\nVITE_PORT=3000\nGOOGLE_APPLICATION_CREDENTIALS_JSON=YOUR_SERVICE_ACCOUNT_KEY_JSON\nReplace YOUR_GOOGLE_ANALYTICS_PROPERTY_ID with your Google Analytics property ID, and YOUR_SERVICE_ACCOUNT_KEY_JSON with the contents of your service account key JSON file. Additional VITE_PORT is needed for frontend to contact backend.\n```\n\n#### E.g.:\n\n```\nPROPERTY_ID=12345678\nPORT=3000\nVITE_PORT=3000\nGOOGLE_APPLICATION_CREDENTIALS_JSON={\"type\": \"service_account\", \"project_id\": \"dashboard1-1682805546629\", \"private_key_id\": \"blablabla\\n-----END PRIVATE KEY-----\\n\", \"client_email\": \"client-email-here\", \"client_id\": \"1234\", \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\", \"token_uri\": \"https://oauth2.googleapis.com/token\", \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\", \"client_x509_cert_url\": \"https://www.somelink.com\"}\n```\n\n### Start the development server:\n\n```\nnpm start\n```\n\n## Contents\n\n#### ExpressJs (Back-end Server) file\n\n```\n/api/index.js\n```\n\n#### Dashboard (GA data fetch example)\n\nUses Tailwind instead\n\n```\n``Pages``\n/src/pages/main/Dashboard.jsx\n\n``Components``\n/src/components/Abs/Table.jsx\n```\n\n#### AB content\n\nUses Style Components (Prefered)\n\n```\n``Pages``\n/src/pages/main/ActiveAb.jsx\n/src/pages/main/AllAb.jsx\n/src/pages/main/NewAb.jsx\n\n``Components``\n/src/components/Abs/AbList.jsx\n/src/components/Abs/AbItem.jsx\n/src/components/Abs/NewAbForm.jsx\n\n``Context``\n/src/setup/ab-context.js\n```\n\n#### Unused utility\n\n```\n/src/setup/google-analytics.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyyminda%2Fab-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyyminda%2Fab-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyyminda%2Fab-analytics/lists"}