Skip to content
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

Matamo analytics support? #41

Closed
samip5 opened this issue Oct 8, 2021 · 10 comments
Closed

Matamo analytics support? #41

samip5 opened this issue Oct 8, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@samip5
Copy link

samip5 commented Oct 8, 2021

Please add support for Matamo (https://matomo.org).

@tomajask
Copy link
Contributor

How about just allowing to add some custom code into <head></head> section. Then one change will allow to use whatever analytics tool you want.

@samip5
Copy link
Author

samip5 commented Oct 15, 2021

That would work too.

@timothystewart6
Copy link
Contributor

Thanks. The goal of the docker container is to keep it simple. Currently Google analytics is as simple as adding your tracking Id, then analytics and button clicks are wired up automatically. I'd like to do the same for any additional analytics system that is added, rather than injecting scripts via env variable.

@timothystewart6
Copy link
Contributor

I am happy to write this integration but I have no easy way of testing it, outside of hosting/creating my own account

@samip5
Copy link
Author

samip5 commented Nov 1, 2021

This is the code for Matamo:

<!-- Matomo -->
<script type="text/javascript">
    var _paq = window._paq || [];
    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
    _paq.push(['trackPageView']);
    _paq.push(['enableLinkTracking']);
    (function () {
        var u = "//samip.fi/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>
<!-- Image Tracker-->
<img src="https://samip.fi/matomo/matomo.php?idsite=1&amp;rec=1" style="border:0" alt=""/>
<!-- End Matomo Code -->

SiteID and the URL to the matomo instance is the most things it would need.

@timothystewart6 timothystewart6 changed the title Rather than Google Analytics, Matamo analytics support? Matamo analytics support? Nov 30, 2021
@timothystewart6 timothystewart6 added the enhancement New feature or request label Feb 20, 2022
@kenjibailly
Copy link
Contributor

Any progress on this? :)

@timothystewart6
Copy link
Contributor

@kenjibailly nope but PRs are welcome! In my experience, the person that cares about it most will add this feature.

@kenjibailly
Copy link
Contributor

I def want to look on how to implement it, but I'm just a hobbyist coder and have no idea how you link your variables to docker. Some pointers would help me out try to make it happen :)

@kenjibailly
Copy link
Contributor

kenjibailly commented Mar 16, 2022

I figured it out and made a pull request for this here: #111

Edit: added image tracking in #112

@timothystewart6
Copy link
Contributor

closed by #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants