Skip to content

Commit

Permalink
Add the matomo analytics site ID setting for the Matomo integration (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed May 11, 2024
1 parent a00dd3f commit 09ac511
Show file tree
Hide file tree
Showing 43 changed files with 146 additions and 7 deletions.
5 changes: 5 additions & 0 deletions application/controllers/Booking.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function index(): void
$disable_booking = setting('disable_booking');
$google_analytics_code = setting('google_analytics_code');
$matomo_analytics_url = setting('matomo_analytics_url');
$matomo_analytics_site_id = setting('matomo_analytics_site_id');

if ($disable_booking) {
$disable_booking_message = setting('disable_booking_message');
Expand All @@ -125,6 +126,7 @@ public function index(): void
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => $google_analytics_code,
'matomo_analytics_url' => $matomo_analytics_url,
'matomo_analytics_site_id' => $matomo_analytics_site_id,
]);

$this->load->view('pages/booking_message');
Expand Down Expand Up @@ -197,6 +199,7 @@ public function index(): void
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => $google_analytics_code,
'matomo_analytics_url' => $matomo_analytics_url,
'matomo_analytics_site_id' => $matomo_analytics_site_id,
]);

$this->load->view('pages/booking_message');
Expand Down Expand Up @@ -225,6 +228,7 @@ public function index(): void
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => $google_analytics_code,
'matomo_analytics_url' => $matomo_analytics_url,
'matomo_analytics_site_id' => $matomo_analytics_site_id,
]);

$this->load->view('pages/booking_message');
Expand Down Expand Up @@ -299,6 +303,7 @@ public function index(): void
'display_delete_personal_information' => $display_delete_personal_information,
'google_analytics_code' => $google_analytics_code,
'matomo_analytics_url' => $matomo_analytics_url,
'matomo_analytics_site_id' => $matomo_analytics_site_id,
'timezones' => $timezones,
'grouped_timezones' => $grouped_timezones,
'manage_mode' => $manage_mode,
Expand Down
2 changes: 2 additions & 0 deletions application/controllers/Booking_cancellation.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function of(string $appointment_hash): void
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => setting('google_analytics_code'),
'matomo_analytics_url' => setting('matomo_analytics_url'),
'matomo_analytics_site_id' => setting('matomo_analytics_site_id'),
]);

$this->load->view('pages/booking_message');
Expand Down Expand Up @@ -118,6 +119,7 @@ public function of(string $appointment_hash): void
'company_color' => setting('company_color'),
'google_analytics_code' => setting('google_analytics_code'),
'matomo_analytics_url' => setting('matomo_analytics_url'),
'matomo_analytics_site_id' => setting('matomo_analytics_site_id'),
]);

$this->load->view('pages/booking_cancellation');
Expand Down
1 change: 1 addition & 0 deletions application/controllers/Booking_confirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function of(): void
'company_color' => setting('company_color'),
'google_analytics_code' => setting('google_analytics_code'),
'matomo_analytics_url' => setting('matomo_analytics_url'),
'matomo_analytics_site_id' => setting('matomo_analytics_site_id'),
'add_to_google_url' => $add_to_google_url,
]);

Expand Down
2 changes: 2 additions & 0 deletions application/language/arabic/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/bulgarian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/catalan/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/chinese/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/croatian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/czech/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/danish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/dutch/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/english/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/estonian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/finnish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Poista Webhook';
$lang['contact_info'] = 'Yhteystiedot';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/french/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Supprimer le webhook';
$lang['contact_info'] = 'Coordonnées';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/german/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/greek/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/hebrew/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/hindi/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/hungarian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/italian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/japanese/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/luxembourgish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/marathi/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/persian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/polish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/portuguese-br/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/portuguese/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/romanian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/russian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/serbian/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/slovak/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Odstrániť webhook';
$lang['contact_info'] = 'Kontaktné informácie';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/spanish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/swedish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/thai/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,4 +455,6 @@
$lang['caldav_connection_info_prompt'] = 'โปรดป้อนข้อมูลการเชื่อมต่อของเซิร์ฟเวอร์ CalDAV เป้าหมาย';
$lang['connect'] = 'เชื่อมต่อ';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
2 changes: 2 additions & 0 deletions application/language/turkish/translations_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@
$lang['delete_webhook'] = 'Delete Webhook';
$lang['contact_info'] = 'Contact Info';
$lang['hide_from_public'] = 'Hide From Public';
$lang['matomo_analytics_site_id'] = 'Matomo Analytics Site ID';
$lang['matomo_analytics_site_id_hint'] = 'Set the site ID that will be tracked by Matomo (the default site has the ID "1").';
// End
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php defined('BASEPATH') or exit('No direct script access allowed');

/* ----------------------------------------------------------------------------
* Easy!Appointments - Online Appointment Scheduler
*
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) Alex Tselegidis
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
* @link https://easyappointments.org
* @since v1.4.0
* ---------------------------------------------------------------------------- */

class Migration_Add_matomo_analytics_site_id_setting extends EA_Migration
{
/**
* Upgrade method.
*/
public function up()
{
if (!$this->db->get_where('settings', ['name' => 'matomo_analytics_site_id'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'matomo_analytics_site_id',
'value' => '1',
]);
}
}

/**
* Downgrade method.
*/
public function down()
{
if ($this->db->get_where('settings', ['name' => 'matomo_analytics_site_id'])->num_rows()) {
$this->db->delete('settings', ['name' => 'matomo_analytics_site_id']);
}
}
}
7 changes: 5 additions & 2 deletions application/views/components/matomo_analytics_script.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/**
* @var string $matomo_analytics_url
* @var string $matomo_analytics_site_id
*/
?>

Expand All @@ -15,7 +16,7 @@
(function () {
var u = "<?= e($matomo_analytics_url) ?>";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '1']);
_paq.push(['setSiteId', '<?= e($matomo_analytics_site_id) ?>']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = u + 'matomo.js';
Expand All @@ -24,7 +25,9 @@
</script>

<noscript>
<p><img src="<?= e($matomo_analytics_url) ?>matomo.php?idsite=1&amp;rec=1" style="border:0;" alt=""/></p>
<p><img src="<?= e($matomo_analytics_url) ?>matomo.php?idsite=<?= e(
$matomo_analytics_site_id,
) ?>&amp;rec=1" style="border:0;" alt=""/></p>
</noscript>

<?php endif; ?>
5 changes: 4 additions & 1 deletion application/views/layouts/booking_layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@
<?php component('js_lang_script'); ?>

<?php component('google_analytics_script', ['google_analytics_code' => vars('google_analytics_code')]); ?>
<?php component('matomo_analytics_script', ['matomo_analytics_url' => vars('matomo_analytics_url')]); ?>
<?php component('matomo_analytics_script', [
'matomo_analytics_url' => vars('matomo_analytics_url'),
'matomo_analytics_site_id' => vars('matomo_analytics_site_id'),
]); ?>

<?php slot('scripts'); ?>

Expand Down
6 changes: 4 additions & 2 deletions application/views/pages/booking_cancellation.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<?php section('scripts'); ?>

<?php component('google_analytics_script', ['google_analytics_code' => vars('google_analytics_code')]); ?>
<?php component('matomo_analytics_script', ['matomo_analytics_url' => vars('matomo_analytics_url')]); ?>

<?php component('matomo_analytics_script', [
'matomo_analytics_url' => vars('matomo_analytics_url'),
'matomo_analytics_site_id' => vars('matomo_analytics_site_id'),
]); ?>
<?php end_section('scripts'); ?>

5 changes: 4 additions & 1 deletion application/views/pages/booking_confirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<?php section('scripts'); ?>

<?php component('google_analytics_script', ['google_analytics_code' => vars('google_analytics_code')]); ?>
<?php component('matomo_analytics_script', ['matomo_analytics_url' => vars('matomo_analytics_url')]); ?>
<?php component('matomo_analytics_script', [
'matomo_analytics_url' => vars('matomo_analytics_url'),
'matomo_analytics_site_id' => vars('matomo_analytics_site_id'),
]); ?>

<?php end_section('scripts'); ?>

0 comments on commit 09ac511

Please sign in to comment.