From 3e6456ffa72c8b3ed493f2a47fbb21e047d6e8f9 Mon Sep 17 00:00:00 2001 From: Rob de Kort Date: Thu, 2 May 2024 20:19:57 +0200 Subject: [PATCH] Add support for the self hosted Matomo tag manager --- .../globals_seo_trackers_analytics.yaml | 20 +++++++++++++++++++ resources/views/snippets/_seo.antlers.html | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/resources/fieldsets/globals_seo_trackers_analytics.yaml b/resources/fieldsets/globals_seo_trackers_analytics.yaml index b55f45b..bc669c5 100644 --- a/resources/fieldsets/globals_seo_trackers_analytics.yaml +++ b/resources/fieldsets/globals_seo_trackers_analytics.yaml @@ -20,6 +20,26 @@ fields: - 'required_if:use_fathom,true' if: use_fathom: 'equals true' + - + handle: use_matomo + field: + type: toggle + instructions: 'Add the Matomo self hosted tag manager to your head.' + listable: false + display: Matomo + - + handle: matomo_script_url + field: + display: 'Script URL' + instructions: 'The Matomo tag manager script url including the container ID.' + input_type: text + type: text + listable: hidden + width: 50 + validate: + - 'required_if:use_matomo,true' + if: + use_matomo: 'equals true' - handle: use_plausible field: diff --git a/resources/views/snippets/_seo.antlers.html b/resources/views/snippets/_seo.antlers.html index 1851823..849ad1a 100644 --- a/resources/views/snippets/_seo.antlers.html +++ b/resources/views/snippets/_seo.antlers.html @@ -198,6 +198,10 @@ {{ /if }} + {{ if seo:use_matomo }} + + {{ /if }} + {{ if seo:use_plausible && seo:plausible_use_custom_script }} {{ elseif seo:use_plausible }}