Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add analytics #1183

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions include/header.inc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,25 @@ if (!isset($config["languages"])) {

<?php if (isset($config['meta_tags'])) { echo $config['meta_tags']; } ?>

<?php if (is_primary_site()) { ?>
<!-- Matomo -->
saundefined marked this conversation as resolved.
Show resolved Hide resolved
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.php.net/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<?php } ?>
</head>
<body class="<?php echo $curr; ?> <?php echo $classes; ?>">

Expand Down
8 changes: 7 additions & 1 deletion privacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@
<h2>Cookies</h2>
<p>
php.net uses cookies to keep track of <a href="/my.php">user preferences</a>. Unless
you login on the site, the cookies will not be used to store personal information and
you login on the site, the cookies will not be used to store personal information, and
we do not give away the information from the cookies.
</p>
<p>
We also use self-hosted analytics service to improve popular sections of the documentation,
and never share user data with third parties.
You may deactivate or restrict the transmission of cookies by changing the settings of your web browser.
Cookies that are already stored may be deleted at any time.
</p>

<?php
site_footer();
Loading