From 7a57a199ecf4a0a6edd38414a00c7c9415d613c1 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Mon, 28 Mar 2022 11:30:26 -0700 Subject: [PATCH] LP#1966802: add Matomo support to Bootstrap OPAC Signed-off-by: Jeff Davis Signed-off-by: Jane Sandberg --- Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 | 7 +++++++ .../opac/parts/matomo_analytics.tt2 | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Open-ILS/src/templates-bootstrap/opac/parts/matomo_analytics.tt2 diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 index eceb162f99..91030b7dc8 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/base.tt2 @@ -27,6 +27,12 @@ [% '' %] [% END %] + [% matomo_id = ctx.get_org_setting(ctx.search_ou, 'opac.analytics.matomo_id'); %] + [% matomo_url = ctx.get_org_setting(ctx.search_ou, 'opac.analytics.matomo_url'); %] + [% IF matomo_id && matomo_url %] + [% matomo_enabled = 1; %] + [% END %] + [%- libname = ctx.get_aou(ctx.search_ou).name; libname = libname | html; libsname = ctx.get_aou(ctx.search_ou).shortname; %] @@ -49,6 +55,7 @@ [% IF !ctx.is_staff %] [% INCLUDE 'opac/parts/goog_analytics.tt2' %] + [% INCLUDE 'opac/parts/matomo_analytics.tt2' %] [% END %] [% PROCESS 'opac/parts/stripe.tt2' %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/matomo_analytics.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/matomo_analytics.tt2 new file mode 100644 index 0000000000..48c7c6769a --- /dev/null +++ b/Open-ILS/src/templates-bootstrap/opac/parts/matomo_analytics.tt2 @@ -0,0 +1,19 @@ +[%- PROCESS "opac/parts/header.tt2"; + IF matomo_enabled == 1 %] + + + + +[%- END %] -- 2.11.0