{"id":14991568,"url":"https://github.com/jverneaut/drupal-plausible-pageviews","last_synced_at":"2026-03-17T04:43:04.441Z","repository":{"id":254754573,"uuid":"847446596","full_name":"jverneaut/drupal-plausible-pageviews","owner":"jverneaut","description":"A custom Drupal Module that adds a pageviews field that fetches data from Plausible Analytics","archived":false,"fork":false,"pushed_at":"2024-08-25T20:59:15.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T02:15:40.719Z","etag":null,"topics":["drupal","drupal-10","drupal-module","php","plausible-analytics"],"latest_commit_sha":null,"homepage":"https://www.julienverneaut.com/en/articles/drupal-popularity-based-sorting-based-plausible-analytics-data","language":"PHP","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/jverneaut.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":"2024-08-25T20:58:02.000Z","updated_at":"2024-09-10T22:29:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"af027feb-d1d0-4971-a6c3-7ff322081edd","html_url":"https://github.com/jverneaut/drupal-plausible-pageviews","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"5fe70cf7c61b851cde656542c13505b4d7de7492"},"previous_names":["jverneaut/drupal-plausible-pageviews"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jverneaut%2Fdrupal-plausible-pageviews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jverneaut%2Fdrupal-plausible-pageviews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jverneaut%2Fdrupal-plausible-pageviews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jverneaut%2Fdrupal-plausible-pageviews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jverneaut","download_url":"https://codeload.github.com/jverneaut/drupal-plausible-pageviews/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243030815,"owners_count":20224666,"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":["drupal","drupal-10","drupal-module","php","plausible-analytics"],"created_at":"2024-09-24T14:37:30.626Z","updated_at":"2025-12-25T04:54:36.958Z","avatar_url":"https://github.com/jverneaut.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drupal Plausible Pageviews Module\n\nThe **Plausible Pageviews Drupal 10 module** integrates Plausible Analytics with your Drupal site, allowing you to store pageviews data for your content. It does this by adding a custom *Plausible pageviews* integer field type that captures pageviews based on the path of each node and a user-defined time period.\n\nThis functionality enables site editors to build sorting and filtering based on real-world popularity data.\n\n## Features\n\n- **Pageviews Tracking:** Automatically fetches and updates pageviews with data from Plausible Analytics.\n- **Automatic Updates:** Updates pageviews data using Drupal’s CRON system according to your site’s schedule.\n\n## Installation and Configuration\n\nFollow these steps to set up the Plausible Pageviews module:\n\n1. **Install the Module:**\n    - Copy the `plausible_pageviews` folder into `/web/modules/custom`.\n2. **Enable the Module:**\n    - Install the module via the Drupal admin interface.\n3. **Configure the Module:**\n    - Go to `/admin/config/system/plausible-pageviews` in your Drupal admin menu.\n    - Enter your Plausible API token in the \"Bearer token\" field. (You can obtain this token from your Plausible account.)\n    - Select your desired time period based on Plausible’s period format.\n    - Set your Plausible site ID.\n4. **Add the Plausible Pageviews Field to Content Types:**\n    - Navigate to the content types where you want to track pageviews.\n    - Add the `plausible_pageviews` field to each content type (using default parameters).\n5. **Run CRON:**\n    - Ensure Drupal’s CRON job is scheduled to run regularly to keep the pageviews data up-to-date.\n\n## Limitations\n\n- **Rate Limiting and Pagination:** This module does not handle Plausible’s rate limiting (600 requests per hour) or pagination (1000 results per page).\n- **Multilingual Sites:** The module currently sums pageviews for nodes with the same ID regardless of the field's translatability. For example, `/contact-us` and `/fr/me-contacter` will be matched to the same node ID, and their pageviews will be summed together.\n\n## Disclaimer\n\nThis module is provided “as is” without any warranty. It serves as a foundation that you can build upon and customize based on your project’s specific needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjverneaut%2Fdrupal-plausible-pageviews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjverneaut%2Fdrupal-plausible-pageviews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjverneaut%2Fdrupal-plausible-pageviews/lists"}