aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-11-01 16:05:49 +0100
committerArmand Philippot <git@armandphilippot.com>2021-11-01 16:05:49 +0100
commit250ee0012e06b453005556f16a2edeccf11ea913 (patch)
tree780afa32cbf40d5c75086e4251cffe52862fa14d /index.php
parent94b5971b02c7dc6ceb5b05edee805cae3b089a04 (diff)
chore: add matomo tracker
Diffstat (limited to 'index.php')
-rw-r--r--index.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/index.php b/index.php
index 9a5afa2..dbc3068 100644
--- a/index.php
+++ b/index.php
@@ -86,6 +86,28 @@ $dap_current_env = dap_get_current_env();
</footer>
<script src="./assets/js/runtime.js"></script>
<script src="./assets/js/app.js"></script>
+ <!-- Matomo -->
+ <script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u = "//demo.armandphilippot.com/";
+ _paq.push(["setTrackerUrl", u + "config/matomo/matomo.php"]);
+ _paq.push(["setSiteId", "3"]);
+ 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 + "config/matomo/matomo.php";
+ s.parentNode.insertBefore(g, s);
+ })();
+ </script>
+ <!-- End Matomo Code -->
</body>
</html>