{"id":17998413,"url":"https://github.com/primaryobjects/chromestats","last_synced_at":"2025-04-04T06:42:16.996Z","repository":{"id":21301907,"uuid":"24618218","full_name":"primaryobjects/chromestats","owner":"primaryobjects","description":"Collect total-user install counts for your Chrome extension daily.","archived":false,"fork":false,"pushed_at":"2016-01-01T16:51:32.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-09T17:47:59.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/primaryobjects.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":"2014-09-30T00:26:52.000Z","updated_at":"2024-02-20T02:58:12.000Z","dependencies_parsed_at":"2022-07-27T02:17:17.486Z","dependency_job_id":null,"html_url":"https://github.com/primaryobjects/chromestats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fchromestats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fchromestats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fchromestats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fchromestats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primaryobjects","download_url":"https://codeload.github.com/primaryobjects/chromestats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135123,"owners_count":20889420,"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":[],"created_at":"2024-10-29T21:25:14.387Z","updated_at":"2025-04-04T06:42:16.977Z","avatar_url":"https://github.com/primaryobjects.png","language":"JavaScript","readme":"ChromeStats\n=========\n### for Linux/Mac/Windows\n\nChromeStats collects total user install counts for your Chrome extension in the Google Chrome store.\n\n![Screenshot 1](https://raw.githubusercontent.com/primaryobjects/chromestats/master/images/chromestats-1.png)\n\nChromeStats works by reading the total number of installs for your extension and saving the count to a Mongo database. Each entry includes a date/time stamp and total install count. Run the script at startup, collect data over time, and watch your total user count grow (or decline :O) over time.\n\nYou can run it using the bash shell or node.js script.\n\nExample Output\n---\n\n```javascript\n{ 'EventDate': ISODate('2014-09-29T22:59:56Z'), 'Users': 25621 }\n```\n\nExample Chart\n---\n\nAn R script is also included, which allows you to chart the results on a graph. Or you can use your favorite graphing tool (Excel, Google Docs, etc). Here's an example.\n\n![Screenshot 2](https://raw.githubusercontent.com/primaryobjects/chromestats/master/images/analytics.png)\n\nInstall\n---\n\n1. Download [chromestats.sh](https://raw.githubusercontent.com/primaryobjects/chromestats/master/chromestats.sh) or [chromestats.js](https://raw.githubusercontent.com/primaryobjects/chromestats/master/chromestats.js) and place it in a folder, such as ~/Documents/chromestats.\n\n2. Edit the file and fill in values for the following variables at the top:\n\n ```sh\n # User-defined variables.\n appId=\"your-app-name/chrome-store-app-id\"\n host=\"host.mongo.com:12345/dbname\"\n user=\"mongo-username\"\n pass=\"mongo-password\"\n ```\n\n3. If you're using the node.js script, run the following command:\n ```sh\n npm install\n ```\n\n4. Run the script:\n\n Bash\n ```sh\n cd ~/Documents/chromestats\n bash chromestats.sh\n ```\n\n Node.js\n ```sh\n cd C:\\Users\\your-user-name\\Documents\\chromestats\\chromestats\n node chromestats\n ```\n\nThe script will collect your total user install count and save it to your mongo database, using the collection name \"analytics\".\n\nRunning at Startup\n---\n\nYou can automatically run the script at boot time by editing /etc/rc.local and adding an entry to run the script. It's a good idea to include logging of the output, so you know it's working. On Linux/Mac, do the following:\n\n1. Edit /etc/rc.local and add the following lines towards the top of the file:\n ```sh\n # Log rc.local to tmp/rc.local.log\n exec 2\u003e /tmp/rc.local.log      # send stderr from rc.local to a log file\n exec 1\u003e\u00262                      # send stdout to the same log file\n set -x\n \n bash \"/home/username/Documents/chromestats/chromestats.sh\"\n ```\n\nOn Windows, do the following:\n\n1. Click Start-\u003eRun. If you're using Windows 8, right-click the Windows start-menu icon and select Run.\n\n2. Type: regedit\n\n3. Navigate to HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\n\n4. Right-click in the right-side window and select New-\u003eString Value.\n\n5. Enter the name: chromestats\n\n6. Double-click the newly created key \"chromestats\" and enter the following for its Value data:\n ```sh\n node C:\\Users\\your-user-name\\Documents\\chromestats\\chromestats\n ```\n\nNote, in Windows, you may want to wait for Internet access before running the script. You can use [wait4net.bat](http://paulhoule.com/wait4net/) to do this, and change the registry command to execute a batch file:\n```sh\n\"C:\\Users\\your-user-name\\Documents\\wait4net.bat\" start /log c:\\temp\\mongobackuplog.txt \"C:\\Users\\your-user-name\\Documents\\chromestats.bat\" \u003e c:\\temp\\mongobackuplog2.txt\n```\n\nLicense\n----\n\nMIT\n\nAuthor\n----\nKory Becker\nhttp://www.primaryobjects.com/kory-becker\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Fchromestats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimaryobjects%2Fchromestats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Fchromestats/lists"}