mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
output individual analytics script
This commit is contained in:
parent
c3abc79d2d
commit
c031a063f0
@ -69,10 +69,14 @@ const krlcAnalytics = (() => { // eslint-disable-line no-unused-vars
|
||||
|
||||
|
||||
return {
|
||||
init: [
|
||||
gaBreakpoints(),
|
||||
gaViewport(),
|
||||
gaPixelDensity()
|
||||
]
|
||||
init() {
|
||||
const dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack
|
||||
|
||||
if (dnt !== 'yes' && dnt !== '1') {
|
||||
gaBreakpoints()
|
||||
gaViewport()
|
||||
gaPixelDensity()
|
||||
}
|
||||
}
|
||||
}
|
||||
})(); // eslint-disable-line semi
|
@ -1,4 +1,4 @@
|
||||
/* global krlcMenu, krlcSearch, krlcModals, krlcAnalytics, svg4everybody */
|
||||
/* global krlcMenu, krlcSearch, krlcModals, svg4everybody */
|
||||
|
||||
/* eslint-disable spaced-comment */
|
||||
//=require webcomponents.js/CustomElements.js
|
||||
@ -9,7 +9,6 @@
|
||||
//=include _menu.js
|
||||
//=include _search.js
|
||||
//=include _modals.js
|
||||
//=include _analytics.js
|
||||
/* eslint-enable spaced-comment */
|
||||
|
||||
|
||||
@ -27,12 +26,6 @@ $(document).ready(() => {
|
||||
//
|
||||
krlcModals.init()
|
||||
|
||||
const dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack
|
||||
|
||||
if (dnt !== 'yes' && dnt !== '1') {
|
||||
krlcAnalytics.init()
|
||||
}
|
||||
|
||||
svg4everybody({
|
||||
nosvg: false
|
||||
})
|
||||
|
@ -69,3 +69,5 @@
|
||||
{% else %}
|
||||
<script async src="//www.google-analytics.com/analytics_debug.js"></script>
|
||||
{% endif%}
|
||||
|
||||
<script src="/assets/js/analytics.min.js" async></script>
|
||||
|
@ -214,6 +214,7 @@ export const criticalCss = done => {
|
||||
export const js = () =>
|
||||
src([
|
||||
SRC + '/_assets/js/kremalicious3.js',
|
||||
SRC + '/_assets/js/analytics.js',
|
||||
'node_modules/picturefill/dist/picturefill.js'
|
||||
])
|
||||
.pipe($.sourcemaps.init())
|
||||
|
Loading…
x
Reference in New Issue
Block a user