[www-doc] [Git][VideoLAN.org/websites][master] Update GA tag

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Nov 28 09:45:54 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN organization / websites


Commits:
c05b564b by Jean-Baptiste Kempf at 2023-11-28T10:45:28+01:00
Update GA tag

- - - - -


1 changed file:

- www.videolan.org/include/header.php


Changes:

=====================================
www.videolan.org/include/header.php
=====================================
@@ -248,15 +248,14 @@ function start_head( $title,
         } ?>
 
         <?php /* Analytics */ ?>
-        <script type="text/javascript">
-            (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','//www.google-analytics.com/analytics.js','ga');
+        <!-- Google tag (gtag.js) -->
+            <script async src="https://www.googletagmanager.com/gtag/js?id=UA-38853043-1"></script>
+            <script type="text/javascript">
+            window.dataLayer = window.dataLayer || [];
+            function gtag(){dataLayer.push(arguments);}
+            gtag('js', new Date());
 
-            ga('create', 'UA-38853043-1', 'auto');
-            ga('set', 'anonymizeIp', true);
-            ga('send', 'pageview');
+            gtag('config', 'UA-38853043-1', { 'anonymize_ip': true })
 
             function isTouchDevice() {
                 return 'ontouchstart' in window || navigator.maxTouchPoints;



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/commit/c05b564ba41feee6894cadab34d11053a46d34c1

-- 
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/commit/c05b564ba41feee6894cadab34d11053a46d34c1
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the www-doc mailing list