{"id":19325916,"url":"https://github.com/linkorb/activity-tracker","last_synced_at":"2025-07-14T11:09:46.114Z","repository":{"id":68245049,"uuid":"133493474","full_name":"linkorb/activity-tracker","owner":"linkorb","description":"activity-tracker.js","archived":false,"fork":false,"pushed_at":"2023-10-26T22:16:17.000Z","size":100,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-24T14:11:22.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/linkorb.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":"2018-05-15T09:33:22.000Z","updated_at":"2018-05-22T09:17:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"c369ff21-b277-48af-bf54-0907e56334e2","html_url":"https://github.com/linkorb/activity-tracker","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"b13a0af0eb958a6a660944932079a38fb055b8bd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linkorb/activity-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Factivity-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Factivity-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Factivity-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Factivity-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkorb","download_url":"https://codeload.github.com/linkorb/activity-tracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Factivity-tracker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265281340,"owners_count":23739874,"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-11-10T02:11:52.004Z","updated_at":"2025-07-14T11:09:46.078Z","avatar_url":"https://github.com/linkorb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"activity-tracker\n========\n\nactivity-tracker.js is a simple way to track browser side user behavior. It is helpful for analyzing users' behavior when reading your web articles. \n\n## Installation\n```\nnpm install @linkorb/activity-tracker\n```\nTo build activity-tracker into your lib with webpack:\n```\nrequire('@linkorb/activity-tracker');\n```\n\n## Demo\n\nCheck the `demo/` directory for an demonstration + example on how to use activity-tracker. To run the demo for test:\n```\nphp -S 127.0.0.1:8888\n```\nThen you can access the demo from: __http://localhost:8888/demo__\n\nIt is possible to configure the activity-tracker:\n```html\n\u003c!-- platform.js is used for reporting the agent info. optional --\u003e\n\u003cscript src=\"node_modules/platform/platform.js\"\u003e\u003c/script\u003e\n\u003c!-- load activity-tracker --\u003e\n\u003cscript src=\"dist/at.min.js\"\u003e\u003c/script\u003e\n\u003c!-- configuread activity-tracker --\u003e\n\u003cscript\u003e\n    // turn on debug mode. Optional\n    at('debug')\n\n    // serverUri is required\n    // without serverUri nothing is recorded, nor reported\n\n    // server address to report to - websocket\n    // at('sender', 'websocket'); // optional, the default sender is websocket\n    at('serverUri', 'ws://127.0.0.1:7777')\n\n    // server address to report to - ajax\n    at('sender', 'xmlhttp')\n    at('serverUri', 'http://localhost/myWebserver')\n    \n    // time interval to report to the server, in ms. Optional, default 5000\n    at('reportInterval', 6000) \n\n    // custom/meta variables. Optional\n    at('meta', 'meRock')\n    at('meta', 'contentId', 6)\n    at('meta', 'userGroup', 'Cool people')\n    at('meta', 'requestId', 'aa-bb-cc-dd-eee')\n\u003c/script\u003e\n```\n\n## Re-provision\nWhen new content/page is loaded without page reload, e.g. AJAX, you can re-provision the activity-tracker:\n```html\n\u003cscript\u003e\nat('meta', 'contentId', 7);\nat('meta', 'requestId', 'ff-gg-hh-ii-jjj');\natProvision();\n\u003c/script\u003e\n```\n\n## Subscribe only to certain events\nBy default, activity-tracker reports the following events: __mousemove__, __click__, __dblclick__, __keyup__, __scroll__. You can specify only certain events are reported:\n```javascript\n// only report click and scroll events\nat('subscribe', 'click, scroll');\natProvision();\n```\n\n## Inspect local activity stack\n```html\n\u003cscript\u003e\n// list all the activity objects recorded\natStack()\n\u003c/script\u003e\n```\n\n## Build from source\nTo change the source file and build, simply use `webpack`.\n```\n# generates dist/at.js\nwebpack -d\n# generates dist/at.min.js\nwebpack -p\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Factivity-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkorb%2Factivity-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Factivity-tracker/lists"}