You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/10/27 13:25:56 UTC

[airflow] branch main updated: Update google_analytics.html (#27226)

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.git


The following commit(s) were added to refs/heads/main by this push:
     new 5e6cec849a Update google_analytics.html (#27226)
5e6cec849a is described below

commit 5e6cec849a5fa90967df1447aba9521f1cfff3d0
Author: oleg-ruban <54...@users.noreply.github.com>
AuthorDate: Thu Oct 27 16:25:47 2022 +0300

    Update google_analytics.html (#27226)
    
    fix bug #27225 - Tracking User Activity Issue: Google Analytics tag version is not up-to-date
    https://github.com/apache/airflow/issues/27225
---
 airflow/www/templates/analytics/google_analytics.html | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/airflow/www/templates/analytics/google_analytics.html b/airflow/www/templates/analytics/google_analytics.html
index ab661a05b6..379f32f930 100644
--- a/airflow/www/templates/analytics/google_analytics.html
+++ b/airflow/www/templates/analytics/google_analytics.html
@@ -17,12 +17,12 @@
  under the License.
 #}
 
+<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id={{ analytics_id }}"></script>
 <script>
-  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+  window.dataLayer = window.dataLayer || [];
+  function gtag(){dataLayer.push(arguments);}
+  gtag('js', new Date());
 
-  ga('create', '{{ analytics_id }}', 'auto');
-  ga('send', 'pageview');
+  gtag('config', '{{ analytics_id }}');
 </script>