{"id":20786161,"url":"https://github.com/josemavarez11/user-navigation-tracker-cdn","last_synced_at":"2026-05-18T03:02:51.875Z","repository":{"id":217938206,"uuid":"745163422","full_name":"josemavarez11/User-Navigation-Tracker-CDN","owner":"josemavarez11","description":"CDN to track user's browsing activity on a website","archived":false,"fork":false,"pushed_at":"2024-01-30T19:41:14.000Z","size":217,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T09:53:02.646Z","etag":null,"topics":["analytics","backend","beacon","cdn","frontend","javascript","tracker","web"],"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/josemavarez11.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":"2024-01-18T19:07:44.000Z","updated_at":"2024-06-29T18:10:53.000Z","dependencies_parsed_at":"2024-01-22T16:14:59.260Z","dependency_job_id":"4f134781-f710-4dff-9004-f24f7dddcc7c","html_url":"https://github.com/josemavarez11/User-Navigation-Tracker-CDN","commit_stats":null,"previous_names":["josemavarez11/tracker-cdn","josemavarez11/user-navigation-tracker-cdn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemavarez11%2FUser-Navigation-Tracker-CDN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemavarez11%2FUser-Navigation-Tracker-CDN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemavarez11%2FUser-Navigation-Tracker-CDN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemavarez11%2FUser-Navigation-Tracker-CDN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josemavarez11","download_url":"https://codeload.github.com/josemavarez11/User-Navigation-Tracker-CDN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243130416,"owners_count":20241162,"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","backend","beacon","cdn","frontend","javascript","tracker","web"],"created_at":"2024-11-17T14:50:58.935Z","updated_at":"2025-10-11T07:37:54.438Z","avatar_url":"https://github.com/josemavarez11.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **User Navigation Tracker CDN**\n\nUser Navigation Tracker is able to detect and transmits user visit data and events to a specified server endpoint.\n\n## ¿How to install and run the Tracker?\n\nJust execute the tracker file in head section of your html code via CDN as follows:\n\n    \u003cscript src=\"https://cdn.jsdelivr.net/gh/josemavarez11/tracker-cdn/tracker.js\" type=\"module\" id=\"tracker\" trackerID=\"ID4567\"\u003e\u003c/script\u003e\n\n\u003e [!IMPORTANT]\n\u003e Use \"tracker\" as id of the script element in html,  and also specify a trackerID valid in server backend.\n\n## ¿How to Use the Tracker?\n\nThe tracker needs the share buttons you want to track to contain the keyword \"share\" in their className attribute. Make sure to configure them this way.\n\nYou can modify the tracker code to change the server endpoints to which the tracker ID verification requests and the sending of the obtained data will go.\n\n## Backend Configuration\n\nThe backend server must have configured a route ready to receive a POST request. It must also be configured to parse the data to string. \nIn the case of Node.js this would be:\n\n\n    app.post('/endpoint/to/receive/data', express.text({ type: '*/*' }), (req, res) =\u003e {\n        //make something with data\n        return res.sendStatus(204)\n    });\n\n\u003e [!IMPORTANT]\n\u003e The server needs an extra route to receive a GET request to certify the validity of the tracker id you are trying to use.\n\n## Data Received\n\nThe data object you will get will look like this:\n\n    {\n        userData: {\n            ip: \"\",\n            trackerID: \"ID4567\",\n            deviceType: \"desktop\",\n            os: \"Windows\",\n            browser: \"Google Chrome\"\n        },\n        navigationData: {\n            url: \"https://yourwebsite/home\",\n            visitTime: 2518,\n            time: \"2024-01-19T14:02:59.182Z\",\n            timeZone: \"America/Caracas UTC-4\"\n        },\n        eventsDetected: {\n            pageclose: true,\n            visibilitychange: false,\n            videoplayed: null,\n            sharebuttonclicked: null\n        }\n    }\n\nWhere: \n\n- userData:\n    -  **ip**: You can add the user's ip from the server by overwriting the data object that arrives in the configured route.\n    - **trackerID**: Web site identifier necessary to use the tracker. It'll be validated by the serve to work.\n    - **deviceType**: Represents the type of device used by the user browsing the site.\n    - **os**: Represents the operating system used by the user browsing the site.\n    - **browser**: Represents the browser used by the user to acces to the site.\n  \n- navigationData:\n    - **url**: Represents the exact url address where the user browsed for the given time.\n    - **visitTime**: Represents the time the user remained on the page until the time he/she closed, switched tabs or minimized the page.\n    - **time**: Exact time at which the user finished browsing the given url page.\n    - **timeZone**: User time zone region and difference from UTC time.\n\n- eventsDetected:\n    - **pageclose**: True or false if user close the page and url changes.\n    - **visibilitychange**: True or false if user minimized the page or switched tabs changing visibility state to hidden.\n    - **videoplayed**: True or false if there is a video in the DOM and user watched 80% of the video.\n    - **sharebuttonclicked**: True or false if there is a share button in the DOM and user clicked it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosemavarez11%2Fuser-navigation-tracker-cdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosemavarez11%2Fuser-navigation-tracker-cdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosemavarez11%2Fuser-navigation-tracker-cdn/lists"}