-
-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] Matomo - Full Photo view logging #348
Comments
I have no experience with Matomo log. However, have you checked your HTTP daemon access logs? Anything accessed in |
Hello Kamil4,
Matomo (formeerly Piwik) https://matomo.org/ is an opensource alternative to Google Analytics, and I think better alternative.
I need somewhere add matomo JS tag, but I dont know where.
Laravel integration of Lychee is more complicated for me than Lychee alone, but Lychee alone is missing important user etc. functionality.
So Lychee-Laravel is a good choice…
Yes, I have Apache logs, which shows, what is required, but log itself is hard to evaluate and not handy.
Matomo output is very user friendly and very simple to evaluate with direct access to visited pages.
Im interested in trigering this script when a Full Photo is displayed…
The tag looks like this:
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//www.somepage.dom/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
Many thanks for help.
|
I see. You are looking for an ability to inject custom code into Lychee-generated pages. I don't believe we have anything of that sort ready to go for HTML/JS (we do have support for custom CSS). You could add it to the gallery blade (https://github.com/LycheeOrg/Lychee-Laravel/blob/master/resources/views/gallery.blade.php), which is a template for all Lychee gallery pages. That would probably be the simplest. However, the template is used both for the photo view and for the album(s) views, while it sounds like you are only interested in photo view? That will be more tricky I think. If that is what you want, I think you will need to add your code directly to our JavaScript front end. |
Many thanks for a good hint. I'll give it a try.
|
Hi there! I am also interested in adding a custom HTML tag on all pages such as Google Analytics/Matomo/etc. As there already is a custom CSS option, this could be done in a similar fashion? I don't think it makes sense to limit it to a single template. |
Hello Julian!
In this case is page hit counted only once, no matter, which next gallery/images are viewed. Script can be also injected in resources/views/includes/blade.head.php, just above If you find out, how to correctly evaluate gallery/image url, please, do not forget share your find. |
Thanks for the suggestion. It seems trying to integrate Matomo would be more effort than it is worth. But, since I am only running the plain Docker image I can't easily change files within it, without building my own image first. |
Im using option two. My luck is, that Im running Apache and LL on my own server, so I have full access to the server logs. Matomo shows me the frequency of user hits, so I can filter logs, to see exact gallery/image hits. |
Now supported. |
Hello, please is there a way how to force Matomo log to see, which Full Photo was viewed by a visitor?
Many thanks!
The text was updated successfully, but these errors were encountered: