Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_piwikTag.twig « templates « Morpheus « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 98581d9ac5b63d0f5864c09adbc86c1d19d229a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{# Disabled by default, tracks activity of this Piwik instance #}

{% if (piwikUrl == 'http://demo.piwik.org/' or enableMeasurePiwikForSiteId) %}
    <div class="clear"></div>
    <!-- Piwik -->
    <script type="text/javascript">
    var _paq = _paq || [];
    _paq.push(['setTrackerUrl', 'piwik.php']);
    _paq.push(['setSiteId', {{ enableMeasurePiwikForSiteId }}]);
    _paq.push(['setCookieDomain', '*.piwik.org']);
    // set the domain the visitor landed on, in the Custom Variable
    _paq.push([function () {
    if (!this.getCustomVariable(1)) {
        this.setCustomVariable(1, "Domain landed", document.domain);
    }
    }]);
    // Set the selected Piwik language in a custom var
    _paq.push(['setCustomVariable', 2, "Demo language", piwik.languageName]);
    _paq.push(['setDocumentTitle', document.domain + "/" + document.title]);
    _paq.push(['trackPageView']);
    _paq.push(['enableLinkTracking']);
    _paq.push(['enableJSErrorTracking']);

    (function() {
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
    g.defer=true; g.async=true; g.src='js/piwik.js'; s.parentNode.insertBefore(g,s);
    })();
    </script>
    <!-- End Piwik Code -->
{% endif %}