mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Add matomo analytics too
This commit is contained in:
parent
f3009d71e7
commit
91cf2dcbba
2 changed files with 20 additions and 0 deletions
|
@ -303,6 +303,22 @@
|
||||||
})(window,document,{$piwik->layer}, {$piwik->site});
|
})(window,document,{$piwik->layer}, {$piwik->site});
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script n:if="OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']['enable']">
|
||||||
|
{var $matomo = (object) OPENVK_ROOT_CONF['openvk']['telemetry']['matomo']}
|
||||||
|
//<![CDATA[
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="//" + {$matomo->container} + "/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', {$matomo->site}]);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
|
||||||
{ifset bodyScripts}
|
{ifset bodyScripts}
|
||||||
{include bodyScripts}
|
{include bodyScripts}
|
||||||
|
|
|
@ -71,6 +71,10 @@ openvk:
|
||||||
container: ""
|
container: ""
|
||||||
site: ""
|
site: ""
|
||||||
layer: "dataLayer"
|
layer: "dataLayer"
|
||||||
|
matomo:
|
||||||
|
enable: false
|
||||||
|
container: ""
|
||||||
|
site: ""
|
||||||
|
|
||||||
credentials:
|
credentials:
|
||||||
smsc:
|
smsc:
|
||||||
|
|
Loading…
Reference in a new issue