{"id":21838400,"url":"https://github.com/aptabase/aptabase-electron","last_synced_at":"2025-04-14T10:32:32.942Z","repository":{"id":168902009,"uuid":"644719448","full_name":"aptabase/aptabase-electron","owner":"aptabase","description":"Electron SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps","archived":false,"fork":false,"pushed_at":"2023-11-04T19:15:00.000Z","size":258,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-27T23:41:48.194Z","etag":null,"topics":["analytics","electron","privacy"],"latest_commit_sha":null,"homepage":"https://aptabase.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aptabase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-24T05:47:56.000Z","updated_at":"2025-03-20T10:31:59.000Z","dependencies_parsed_at":"2023-10-30T09:31:30.007Z","dependency_job_id":null,"html_url":"https://github.com/aptabase/aptabase-electron","commit_stats":null,"previous_names":["aptabase/aptabase-electron"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptabase%2Faptabase-electron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptabase%2Faptabase-electron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptabase%2Faptabase-electron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptabase%2Faptabase-electron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aptabase","download_url":"https://codeload.github.com/aptabase/aptabase-electron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248862512,"owners_count":21173822,"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":["analytics","electron","privacy"],"created_at":"2024-11-27T21:10:54.422Z","updated_at":"2025-04-14T10:32:32.912Z","avatar_url":"https://github.com/aptabase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Aptabase](https://aptabase.com/og.png)\n\n# Electron SDK for Aptabase\n\nInstrument your Electron apps with Aptabase, an Open Source, Privacy-First, and Simple Analytics for Mobile, Desktop, and Web Apps.\n\n## Install\n\nInstall the SDK using your preferred JavaScript package manager\n\n```bash\nnpm add @aptabase/electron\n```\n\n## Usage\n\nFirst, you need to get your `App Key` from Aptabase, you can find it in the `Instructions` menu on the left side menu.\n\nOn your Electron main's process, initialize the SDK before the app is ready:\n\n```js\nimport { initialize } from \"@aptabase/electron/main\";\n\ninitialize(\"\u003cYOUR_APP_KEY\u003e\"); // 👈 this is where you enter your App Key\n\napp.whenReady().then(() =\u003e {\n  // ... the rest of your app initialization code\n});\n```\n\nAfterward, you can start tracking events with `trackEvent`:\n\n```js\nimport { trackEvent } from \"@aptabase/electron/renderer\";\n\ntrackEvent(\"app_started\"); // An event with no properties\ntrackEvent(\"screen_view\", { name: \"Settings\" }); // An event with a custom property\n```\n\n**NOTE:** The `trackEvent` function is available under separate import paths, depending on where you want to track the event from.\n\n- import from `@aptabase/electron/renderer` to track events from the `renderer` process\n- import from `@aptabase/electron/main` to track events from the `main` process\n\n\u003e The instruction above is recommended for modern setups of Electron. For older versions of Electron, please refer to the [alternative instructions](https://github.com/aptabase/aptabase-electron/discussions/1).\n\nA few important notes:\n\n1. The SDK will automatically enhance the event with some useful information, like the OS, the app version, and other things.\n2. You're in control of what gets sent to Aptabase. This SDK does not automatically track any events, you need to call `trackEvent` manually.\n   - Because of this, it's generally recommended to at least track an event at startup\n3. You do not need to await for the `trackEvent` function, it'll run in the background.\n4. Only strings and numbers values are allowed on custom properties\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faptabase%2Faptabase-electron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faptabase%2Faptabase-electron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faptabase%2Faptabase-electron/lists"}