{"id":21258285,"url":"https://github.com/ubc/canvas-page-view","last_synced_at":"2025-07-11T02:32:32.275Z","repository":{"id":74594232,"uuid":"293888380","full_name":"ubc/canvas-page-view","owner":"ubc","description":"Download Canvas user(s) full page view logs","archived":false,"fork":false,"pushed_at":"2024-10-15T20:39:28.000Z","size":105,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-17T07:07:30.539Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-08T18:01:05.000Z","updated_at":"2024-10-15T20:39:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"cad561c7-22a1-422b-b0f6-4e09d86408ca","html_url":"https://github.com/ubc/canvas-page-view","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/ubc%2Fcanvas-page-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcanvas-page-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcanvas-page-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcanvas-page-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubc","download_url":"https://codeload.github.com/ubc/canvas-page-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669502,"owners_count":17505386,"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-21T04:08:02.203Z","updated_at":"2024-11-21T04:08:02.900Z","avatar_url":"https://github.com/ubc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Canvas Page View\nThis project downloads the page views for specified Canvas users and outputs a CSV for each user with the following headers:\n* 'id'\n* 'app_name'\n* 'url'\n* 'context_type'\n* 'asset_type'\n* 'controller'\n* 'interaction_seconds'\n* 'created_at'\n* 'user_request'\n* 'render_time'\n* 'user_agent'\n* 'participated'\n* 'http_method'\n* 'remote_ip'\n* 'links'\n\nAn explanation of what these headers mean can be found here: https://canvas.instructure.com/doc/api/users.html#PageView\n\n## Getting Started\nThese instructions will get you a copy of the project up and running on your local machine for use with your own API tokens and Canvas domains.\n\n### Prerequisites\n\n1. **Install [Node 10 or greater](https://nodejs.org)**.\n2. **Install [Git](https://git-scm.com/downloads)**.\n\n### Host URL and Token setup\n1. Create a `.env` file.\n1. Generate Canvas API token and copy it to clipboard.\n1. Add the following: `CANVAS_API_TOKEN={YOUR API TOKEN}` and `CANVAS_API_DOMAIN={YOUR API DOMAIN}`.\nAn example `CANVAS_API_DOMAIN` is `https://{school}.instructure.com/api/v1`\n\n### Installation and execution of script\n\n1. Clone this repo. `git clone https://github.com/ubccapico/canvas-page-view`\n1. Then cd into the repo. `cd canvas-page-view`\n1. Run the installation script. `npm install` (If you see `babel-node: command not found`, you've missed this step.)\n1. Add your Canvas user IDs to `index.js`, as well as the start time and end time, where it says: `getPageViewsForUsers([/* add Canvas user IDs */], /* add start date */, /* add end date */)`\n1. The start and end times should be specified in UTC time like this: `2020-05-18T00:00:00Z`\n1. Run the script. `npm start`.\n1. An `{Canvas user id}-pageviews.csv` file should be generated for each Canvas user id.\n\n## Note\nPlease note that this project downloads `remote-ip`, which is the origin IP address of the request. IP addresses are considered personal information and should be treated with care. Sharing IP addresses of students without formal approval from an Associate Dean is not permitted. Please contact the [LTHub](mailto:lt.hub@ubc.ca) if you have any questions or concerns.\n\n## Authors\n\n* [justin0022](https://github.com/justin0022) -\n**Justin Lee** \u0026lt;justin.lee@ubc.ca\u0026gt;\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fcanvas-page-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubc%2Fcanvas-page-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fcanvas-page-view/lists"}