hexo-theme-next
Advanced tools
Comparing version 8.18.2 to 8.19.0
{ | ||
"name": "hexo-theme-next", | ||
"version": "8.18.2", | ||
"version": "8.19.0", | ||
"description": "Elegant and powerful theme for Hexo.", | ||
@@ -38,10 +38,10 @@ "main": "package.json", | ||
"chai": "4.3.10", | ||
"eslint": "8.51.0", | ||
"hexo": "6.3.0", | ||
"hexo-renderer-marked": "6.1.1", | ||
"eslint": "8.55.0", | ||
"hexo": "7.0.0", | ||
"hexo-renderer-marked": "6.2.0", | ||
"js-yaml": "4.1.0", | ||
"mocha": "10.2.0", | ||
"stylelint": "15.10.3", | ||
"stylelint": "15.11.0", | ||
"stylelint-stylus": "0.18.0" | ||
} | ||
} |
@@ -25,9 +25,27 @@ /* global CONFIG, dataLayer, gtag */ | ||
localStorage.setItem('uid', uid); | ||
navigator.sendBeacon('https://www.google-analytics.com/collect', new URLSearchParams({ | ||
v : 1, | ||
tid: CONFIG.google_analytics.tracking_id, | ||
cid: uid, | ||
t : 'pageview', | ||
dp : encodeURIComponent(location.pathname) | ||
})); | ||
fetch( | ||
'https://www.google-analytics.com/mp/collect?' + new URLSearchParams({ | ||
api_secret : CONFIG.google_analytics.measure_protocol_api_secret, | ||
measurement_id: CONFIG.google_analytics.tracking_id | ||
}), | ||
{ | ||
method : 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify({ | ||
client_id: uid, | ||
events : [ | ||
{ | ||
name : 'page_view', | ||
params: { | ||
page_location: location.href, | ||
page_title : document.title | ||
} | ||
} | ||
] | ||
}), | ||
mode: 'no-cors' | ||
} | ||
); | ||
}; | ||
@@ -34,0 +52,0 @@ document.addEventListener('pjax:complete', sendPageView); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
476615
3129
4