aboutsummaryrefslogtreecommitdiffstats
path: root/public/matomo/config.php
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-20 16:11:50 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-20 16:15:08 +0100
commit73a5c7fae9ffbe9ada721148c8c454a643aceebe (patch)
treec8fad013ed9b5dd589add87f8d45cf02bbfc6e91 /public/matomo/config.php
parentb01239fbdcc5bbc5921f73ec0e8fee7bedd5c8e8 (diff)
chore!: restructure repo
I separated public files from the config/dev files. It improves repo readability. I also moved dotenv helper to public/inc directory and extract the Matomo tracker in the same directory.
Diffstat (limited to 'public/matomo/config.php')
-rw-r--r--public/matomo/config.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/public/matomo/config.php b/public/matomo/config.php
new file mode 100644
index 0000000..26959c3
--- /dev/null
+++ b/public/matomo/config.php
@@ -0,0 +1,41 @@
+<?php
+
+// -----
+// Important: read the instructions in README.md or at:
+// https://github.com/matomo/matomo/tree/master/misc/proxy-hide-matomo-url#matomo-proxy-hide-url
+// -----
+
+// Edit the line below, and replace http://your-matomo-domain.example.org/matomo/
+// with your Matomo URL ending with a slash.
+// This URL will never be revealed to visitors or search engines.
+$MATOMO_URL = 'https://analytics.armandphilippot.com/';
+
+// Edit the line below and replace http://your-tracker-proxy.org/ with the URL to your tracker-proxy
+// setup. This URL will be used in Matomo output that contains the Matomo URL, so your Matomo is effectively
+// hidden.
+$PROXY_URL = 'https://demo.armandphilippot.com/matomo/';
+
+// Edit the line below, and replace xyz by the token_auth for the user "UserTrackingAPI"
+// which you created when you followed instructions above.
+$TOKEN_AUTH = '35406adc4e440240a09a679957b08540';
+
+// Maximum time, in seconds, to wait for the Matomo server to return the 1*1 GIF
+$timeout = 5;
+
+// By default, the HTTP User Agent will be set to the user agent of the client requesting matomo.php
+// Edit the line below to force the proxy to always use a specific user agent string.
+$user_agent = '';
+
+// In some situations the backend takes the sending IP address into account
+// which by default is the IP address of the server/service proxy.php is executed from.
+// If $http_forward_header is set, the clients IP address is sent over in the
+// header field with the given name. An empty string means do not send the header.
+// A common header name is 'X-Forwarded-For'.
+//
+// In order to work, the http server serving the matomo instance, has to be configured
+// to honor the additional header.
+//
+// For apache http see https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html
+// for nginx see https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/
+//
+$http_ip_forward_header = '';