From 19c77678fbe50346f49138844936c0ff7b92898e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 4 Apr 2024 18:24:47 +0100 Subject: [PATCH] Add Plausible Analytics --- composer.json | 1 + composer.lock | 56 ++++++++++++++++++++++++++++-- config/sync/core.extension.yml | 1 + config/sync/plausible.settings.yml | 22 ++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 config/sync/plausible.settings.yml diff --git a/composer.json b/composer.json index e45fcc7..3d1ca3e 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "drupal/core-recommended": "^10.2", "drupal/layout_builder_modal": "^1.2", "drupal/pathauto": "^1.12", + "drupal/plausible": "^2.1", "drupal/rabbit_hole": "^1.0@beta", "drupal/redirect": "^1.9", "drush/drush": "^12.5" diff --git a/composer.lock b/composer.lock index 363de08..d82ccf2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c366bf941b84fac1a54082cc3eff2d8a", + "content-hash": "513fb0358414a9218ded9f4ad2ee7a2c", "packages": [ { "name": "asm89/stack-cors", @@ -1769,6 +1769,58 @@ "documentation": "https://www.drupal.org/docs/8/modules/pathauto" } }, + { + "name": "drupal/plausible", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/plausible.git", + "reference": "2.1.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/plausible-2.1.0.zip", + "reference": "2.1.0", + "shasum": "7c9ab067bf07882aad4a2f8236050efc8376d66a" + }, + "require": { + "drupal/core": "^8.8.6 || ^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.1.0", + "datestamp": "1687203441", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "DieterHolvoet", + "homepage": "https://www.drupal.org/user/3567222" + }, + { + "name": "droces", + "homepage": "https://www.drupal.org/user/2996575" + }, + { + "name": "opdavies", + "homepage": "https://www.drupal.org/user/381388" + } + ], + "description": "Allows your site to be tracked using Plausible, by adding a Javascript tracking snippet to every page.", + "homepage": "https://www.drupal.org/project/plausible", + "support": { + "source": "https://git.drupalcode.org/project/plausible" + } + }, { "name": "drupal/rabbit_hole", "version": "1.0.0-beta11", @@ -6607,5 +6659,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index f412702..dd5f690 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -37,6 +37,7 @@ module: page_cache: 0 path: 0 path_alias: 0 + plausible: 0 rabbit_hole: 0 redirect: 0 rh_node: 0 diff --git a/config/sync/plausible.settings.yml b/config/sync/plausible.settings.yml new file mode 100644 index 0000000..970ff42 --- /dev/null +++ b/config/sync/plausible.settings.yml @@ -0,0 +1,22 @@ +_core: + default_config_hash: 7ITcwwShhS7SG3SJdIqRQkzXEcEPNejdEnbeDVDeDY0 +script: + domain: oliverdavies.uk + api: '' + src: 'https://plausible.io/js/plausible.js' +dashboard: + shared_link: '' +visibility: + enable: false + admin_route_mode: 1 + request_path_mode: 0 + request_path_pages: '' + user_role_roles: + anonymous: anonymous + authenticated: '0' + content_editor: '0' + administrator: '0' + user_role_mode: 1 +events: + 403: true + 404: true