integrate Google Analytics

Message ID 20230629063941.2052848-1-thomas@monjalon.net (mailing list archive)
State Accepted
Headers
Series integrate Google Analytics |

Commit Message

Thomas Monjalon June 29, 2023, 6:39 a.m. UTC
  For marketing purpose, statistics are collected in Google Analytics
with an account managed by the Linux Foundation.

Requested-by: Ben Thomas <bthomas@linuxfoundation.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 layouts/partials/custom-head.html | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Patch

diff --git a/layouts/partials/custom-head.html b/layouts/partials/custom-head.html
index 9f510bb..5408266 100644
--- a/layouts/partials/custom-head.html
+++ b/layouts/partials/custom-head.html
@@ -2,3 +2,12 @@ 
 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.css">
 <link rel="stylesheet" href="{{ .Site.BaseURL }}/css/dpdk.css">
 <link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
+
+<!-- Google Analytics -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-KDHYQZK4GW"></script>
+<script>
+  window.dataLayer = window.dataLayer || [];
+  function gtag(){dataLayer.push(arguments);}
+  gtag('js', new Date());
+  gtag('config', 'G-KDHYQZK4GW');
+</script>