Skip to content

Matomo Tracking-Code #279

Answered by orestbida
mjegulla asked this question in Q&A
Mar 25, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @mjegulla,

yes, but you need to configure the tracking code appropriately. Check out matomo's docs.

Here is one way you could implement it:

  1. Place matomo's the tracking code into your pages (added _paq.push(['requireConsent'])):
    <!-- Matomo -->
    <script type="text/javascript">
        var _paq = window._paq = window._paq || [];
        // require user tracking consent before processing data
        _paq.push(['requireConsent']);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="//{$MATOMO_URL}/";
            _paq.push(['setTrackerUrl', u+'matomo.php']);
            _paq.push(['setSiteId', {$IDSITE}]);
            var d=document, g=d.createElement('script'), 

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mjegulla
Comment options

@orestbida
Comment options

@mjegulla
Comment options

@Brumonti
Comment options

Answer selected by orestbida
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants