{"id":15198351,"url":"https://github.com/vishalkalola1/clappr-analytics-plugin","last_synced_at":"2026-03-04T20:33:47.775Z","repository":{"id":40413322,"uuid":"314256100","full_name":"vishalkalola1/Clappr-Analytics-Plugin","owner":"vishalkalola1","description":"A plugin for clappr which will get all user events. Event handlers can be used to handle and verify user input, user actions, and browser actions.","archived":false,"fork":false,"pushed_at":"2022-05-10T08:40:01.000Z","size":1298,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T03:44:07.192Z","etag":null,"topics":["analytics","clappr","demo","javascript","module","plugin","socket-io"],"latest_commit_sha":null,"homepage":"https://vishalkalola1.github.io/Clappr-Analytics-Plugin/","language":"JavaScript","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/vishalkalola1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-19T13:27:40.000Z","updated_at":"2021-09-29T21:17:19.000Z","dependencies_parsed_at":"2022-08-09T19:40:44.652Z","dependency_job_id":null,"html_url":"https://github.com/vishalkalola1/Clappr-Analytics-Plugin","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/vishalkalola1%2FClappr-Analytics-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishalkalola1%2FClappr-Analytics-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishalkalola1%2FClappr-Analytics-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishalkalola1%2FClappr-Analytics-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vishalkalola1","download_url":"https://codeload.github.com/vishalkalola1/Clappr-Analytics-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605738,"owners_count":19989608,"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","clappr","demo","javascript","module","plugin","socket-io"],"created_at":"2024-09-28T01:03:38.668Z","updated_at":"2026-03-04T20:33:46.897Z","avatar_url":"https://github.com/vishalkalola1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clappr Analytics Plugin\n\n[![npm version](https://badge.fury.io/js/clappr-analytics-plugin.svg)](https://www.npmjs.com/package/clappr-analytics-plugin)\n\n**A plugin for clappr which will get all user events. Event handlers can be used to handle and verify user input, user actions, and browser actions:**\n\n* Things that should be done every time a page loads\n* Things that should be done when the page is closed\n* Action that should be performed when a user clicks a button\n* Content that should be verified when a user inputs data\n* And more ...\n\n**Many different methods can be used to let JavaScript work with events:**\n\n* HTML event attributes can execute JavaScript code directly\n* HTML event attributes can call JavaScript functions\n* You can assign your own event handler functions to HTML elements\n* You can prevent events from being sent or being handled\n* And more ...\n\n# Usage\nAdd both Clappr and the Analytics plugin scripts to your HTML:\n\n**HTML**\n```\n\u003chead\u003e\n  \u003cscript type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/clappr@0.3/dist/clappr.min.js\"\u003e\u003c/script\u003e\n  \u003cscript type=\"text/javascript\" src=\"../dist/clappr-analytics-plugin.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\nThen just add `ClapprAnalyticsPlugin` into the list of plugins of your player instance, and the options for the plugin go in the `analyticsdata` property as shown below.\n\n**Javascript**\n```\nvar player = new Clappr.Player({\n    source: \"https://tjenkinson.me/clappr-thumbnails-plugin/assets/video.mp4\",\n    parentId: \"#player\",\n    plugins: {\n        container: [ClapprAnalyticsPlugin]\n    },\n    analyticsdata: {\n        socketbaseurl: 'https://clappranalytics.herokuapp.com/', // add your backend url\n        channelname: \"events\", // get channelname from backend and add here\n        offlinedatachannelname: \"offlineevents\" // get offlineevents from backend and add here\n    }\n});\n```\n\n**Note: Setup Flask with socket.io and connect through websocket. do not use transport long-polling method use websocket**\n\n[![Github Version](https://badge.fury.io/gh/vishalkalola1%2FClappr-Analytics-Plugin.svg)](https://vishalkalola1.github.io/Clappr-Analytics-Plugin/)\n\n**Backend**\n```\n@socketio.on(\"offlineevents\") // \"offlineevents\" channel name in frontend\ndef handle_offlinedata(messages):\n    return messages\n    \n@socketio.on(\"events\") // \"events\" channel name in frontend\ndef handle_Channel1(message):\n    return message\n```\n\n# Development Server\n`npm run start`\n\n# Development\n* Install dependencies:\n\n`npm install`\n\n* Build:\n\n`npm run build`\n\n* Minified version:\n\n`npm run release`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishalkalola1%2Fclappr-analytics-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishalkalola1%2Fclappr-analytics-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishalkalola1%2Fclappr-analytics-plugin/lists"}