Always load Google Analytics over HTTPS

Recommended by Google - and is safer and faster
This commit is contained in:
Christian Oliff 2018-04-24 16:45:13 +09:00 committed by GitHub
parent a7b5fb7e36
commit eeaa77de33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -854,7 +854,7 @@ tarteaucitron.services.analytics = {
};
window.ga.l = new Date();
tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
tarteaucitron.addScript('https://www.google-analytics.com/analytics.js', '', function () {
ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
ga('send', 'pageview');
if (typeof tarteaucitron.user.analyticsMore === 'function') {
@ -876,7 +876,7 @@ tarteaucitron.services.gtag = {
"use strict";
window.dataLayer = window.dataLayer || [];
tarteaucitron.addScript('//www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', tarteaucitron.user.gtagUa);