This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site.git
The following commit(s) were added to refs/heads/main by this push:
new 7ef3235ba Add Matomo tag in the proper location for Docsy (#577)
7ef3235ba is described below
commit 7ef3235ba78f3c9002526e7e4e69cd7682c306dc
Author: Ross Turk <[email protected]>
AuthorDate: Fri Apr 22 16:22:28 2022 -0400
Add Matomo tag in the proper location for Docsy (#577)
* Add Matomo tag to docsy head-end hook
---
landing-pages/site/config.toml | 2 +-
.../site/layouts/partials/hooks/head-end.html | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/landing-pages/site/config.toml b/landing-pages/site/config.toml
index 3bbb5d739..5fc4791c3 100644
--- a/landing-pages/site/config.toml
+++ b/landing-pages/site/config.toml
@@ -51,7 +51,7 @@ anchor = "smart"
[services]
[services.googleAnalytics]
# Comment out the next line to disable GA tracking. Also disables the feature
described in [params.ui.feedback].
-id = "UA-XXXXXXXXX-X"
+# id = "UA-140539454-1"
# Language configuration
diff --git a/landing-pages/site/layouts/partials/hooks/head-end.html
b/landing-pages/site/layouts/partials/hooks/head-end.html
index 41924ed20..c84042310 100644
--- a/landing-pages/site/layouts/partials/hooks/head-end.html
+++ b/landing-pages/site/layouts/partials/hooks/head-end.html
@@ -29,6 +29,24 @@
<link href="{{ $css.RelPermalink }}" rel="stylesheet" integrity="{{
$css.Data.integrity }}">
{{ end }}
+<!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
+ /* We explicitly disable cookie tracking to avoid privacy issues */
+ _paq.push(['disableCookies']);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '13']);
+ 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 -->
+
{{ with .Site.Data.webpack }}
<link rel="preload" href="{{ relURL .main.js }}" as="script">
<link rel="preload" href="{{ relURL .header.js }}" as="script">