{"id":15368028,"url":"https://github.com/anonrig/socketkit-js","last_synced_at":"2025-10-11T05:18:08.091Z","repository":{"id":42569476,"uuid":"384910691","full_name":"anonrig/socketkit-js","owner":"anonrig","description":"Socketkit JavaScript Client and SDK for user-behavior analysis","archived":false,"fork":false,"pushed_at":"2023-03-06T19:48:41.000Z","size":3725,"stargazers_count":11,"open_issues_count":7,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-31T15:54:58.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://socketkit.com","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/anonrig.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":"2021-07-11T09:45:38.000Z","updated_at":"2023-07-19T01:18:46.000Z","dependencies_parsed_at":"2024-10-16T09:21:29.957Z","dependency_job_id":null,"html_url":"https://github.com/anonrig/socketkit-js","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.09090909090909094,"last_synced_commit":"b8f133457ada1301ba7682a963122e61f3e62336"},"previous_names":["socketkit/socketkit-js"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/anonrig/socketkit-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anonrig%2Fsocketkit-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anonrig%2Fsocketkit-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anonrig%2Fsocketkit-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anonrig%2Fsocketkit-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anonrig","download_url":"https://codeload.github.com/anonrig/socketkit-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anonrig%2Fsocketkit-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006351,"owners_count":26084084,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":[],"created_at":"2024-10-01T13:27:47.306Z","updated_at":"2025-10-11T05:18:08.070Z","avatar_url":"https://github.com/anonrig.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Socketkit JavaScript SDK\n\nAccess Socketkit using cross-platform JavaScript SDK to anonymously track and understand user behavior with built-in security.\n\n## Install\n\n```\nnpm i --save socketkit\n```\n\n## Setup\n\n```javascript\nimport Socketkit from 'socketkit'\nimport { randomUUID } from 'crypto'\n\nconst options = {\n  authorization_key: 'authorization_key',\n  signing_key: 'signing_key'\n}\nconst client = new Socketkit(options)\n\n// Store this preferably in your own database for future reference.\nconst clientId = randomUUID()\nclient.setClientId(clientId)\nclient.sendEvent({ name: 'custom', timestamp: new Date().toISOString(), custom_key: 'value' })\n```\n\n## Send events\n\n### app_open\n\nApp open event type should be sent when the application is booted. Includes characteristic features of a client for analytical purposes. For properties and their requirements please look into [the definition](https://github.com/socketkit/socketkit-js/blob/main/events.js#L3).\n\n```javascript\nclient.sendEvent({\n  name: \"app_open\",\n  timestamp: new Date().toISOString(),\n  locale: 'en-US',\n  manufacturer: 'Apple',\n  platform: 'ios',\n  type: 'iPad13,1',\n  carrier: 'T-Mobile',\n  os_name: 'iOS',\n  os_version: '14.4.1',\n  screen_size: [2778, 1284],\n  application_build_number: 14,\n  application_version: '1.0.0',\n  library_version: '0.4.1',\n  watch_model: 'Apple Watch 38mm', // if the client is watchOS.\n})\n```\n\n### in_app_purchase\n\nIncludes all the information related to tracking a in app purchase payment. For properties and their requirements please look into [the definition](https://github.com/socketkit/socketkit-js/blob/main/events.js#L92).\n\n```javascript\nclient.sendEvent({\n  name: \"in_app_purchase\",\n  timestamp: new Date().toISOString(),\n  product_name: \"Weekly Package\",\n  product_quantity: 1,\n  product_price: 4.99,\n  product_currency: \"USD\"\n})\n```\n\n### set_client\n\nSet client event type gives the ability to store more information about the user. It should not store any identifiable data for privacy compliance. For properties and their requirements please look into [the definition](https://github.com/socketkit/socketkit-js/blob/main/events.js#L135).\n\n```javascript\nclient.sendEvent({\n  name: \"set_client\",\n  timestamp: new Date().toISOString(),\n  distinct_id: null,\n  referer: \"Google\",\n  push_token: null,\n  is_opt_out: false, // required for GDPR compliance\n  additional_properties: {\n    ab_test_enabled: false\n  }\n})\n```\n\n### custom\n\nCustom event type gives the user the ability to send any kind of data to the Awacs server. For properties and their requirements please look into [the definition](https://github.com/socketkit/socketkit-js/blob/main/events.js#L175).\n\n```javascript\nclient.sendEvent({\n  name: \"custom\",\n  timestamp: new Date().toISOString(),\n  random_key: \"value\"\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanonrig%2Fsocketkit-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanonrig%2Fsocketkit-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanonrig%2Fsocketkit-js/lists"}