Fix loading Google Analytics.

This commit is contained in:
2020-06-10 18:28:00 +01:00
parent 0faa688ef4
commit a6901b8e6b
3 changed files with 10 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<Version>4.0.0.1620</Version> <Version>4.0.0.1622</Version>
<Company>Canary Islands Computer Museum</Company> <Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright> <Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product> <Product>Canary Islands Computer Museum Website</Product>

View File

@@ -44,7 +44,6 @@
<link href="_content/Blazorise/blazorise.css" rel="stylesheet" /> <link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" /> <link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" /> <link href="css/site.css" rel="stylesheet" />
<script crossorigin="anonymous" src="https://ssl.google-analytics.com/analytics.js" async id="ga"></script>
<script src="js/ga.js"></script> <script src="js/ga.js"></script>
</head> </head>
<body> <body>

View File

@@ -23,7 +23,12 @@
// Copyright © 2003-2020 Natalia Portillo // Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/ *******************************************************************************/
window.addEventListener('load', function () { var _gaq = _gaq || [];
ga('create', 'UA-XXXXXXXX-1', 'auto') _gaq.push(['_setAccount', 'UA-XXXXX-X']);
ga('send', 'pageview') _gaq.push(['_trackPageview']);
})
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();