January 9, 2023, 1:58pm
i tried to integrate Matomo to my page.
Matomo is already running and working. But if i follow the steps as descipted in the readme.md from the
kirby-matomo plugin, matomo did not see the visitors.
Step 4 is not that clear for me:
You only need to include the snippet in your code somewhere:
<?php snippet('matomo'); ?>
But i tried to implement it in the footer snippet.
Is there anybody with experience with the kirby-matomo plugin? If somebody has experience and able to help, i have no problem to pay for this help
I saw you opened an issue in the plugin repo. Looks like you made a mistake in your config, unless those settings are your only ones.
But you cannot have a second return statement in your config, everything after the first return will be ignored. So you need to return one array with all settings. It is important to understand that a
return statement stops execution of the current script/method and returns to the calling method/script.
January 10, 2023, 8:36am
thx for your reply.
in my footer.php i have the following:
<?php if($site->footerBuilder() == "layout-builder"): ?>
<?php echo snippet('matomo') ?>
<?php foreach ($site->layout()->toLayouts() as $layout): ?>
<?php snippet('layout/layout', ['layout' => $layout]) ?>
<?php endforeach ?>
and in my config.php:
'sylvainjule.matomo.url' => 'http://your-matomo.url',
'sylvainjule.matomo.id' => '1',
'sylvainjule.matomo.token' => 'token_auth',
'panel' => [
'css' => 'assets/css/panel.css'
so yes, i first fault was that i had two return commands.
Now i copied the code direct under the first return command.
But i didn’t changed anything.
Now i copied the java tracking code given from matomo in the footer.php and i can see
So i think my matomo installation worked, but the matomo plugin for kirby not.
http://your-matomo.url is in my config correct with my personal url and id and token_auth of course)