Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vilem Ded
courses
Commits
161ac679
Verified
Commit
161ac679
authored
Jul 08, 2020
by
Laurent Heirendt
✈
Browse files
add matomo parts to deploy script
parent
269f3391
Changes
1
Hide whitespace changes
Inline
Side-by-side
.ci/deploy.sh
View file @
161ac679
...
...
@@ -49,23 +49,12 @@ do
# add matomo
if
[[
-v
matomoID
]]
;
then
matomoTagOrig
=
'<!-- Matomo -->'
matomoTag
=
"<script type='text/javascript'>"
matomoTag
=
"
${
matomoTag
}
var _paq = window._paq || [];"
matomoTag
=
"
${
matomoTag
}
/* tracker methods like 'setCustomDimension' should be called before 'trackPageView' */"
matomoTag
=
"
${
matomoTag
}
_paq.push(['trackPageView']);"
matomoTag
=
"
${
matomoTag
}
_paq.push(['enableLinkTracking']);"
matomoTag
=
"
${
matomoTag
}
(function() {"
matomoTag
=
"
${
matomoTag
}
var u='https://analytics.lcsb.uni.lu/hub/';"
matomoTag
=
"
${
matomoTag
}
_paq.push(['setTrackerUrl', u+'matomo.php']);"
matomoTag
=
"
${
matomoTag
}
_paq.push(['setSiteId', '
${
matomoID
}
']);"
matomoTag
=
"
${
matomoTag
}
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];"
matomoTag
=
"
${
matomoTag
}
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);"
matomoTag
=
"
${
matomoTag
}
})();"
matomoTag
=
"
${
matomoTag
}
</script>"
# replace the tag
sed
-i
''
's#'
"
$matomoTagOrig
"
'#'
"
$matomoTag
"
'#g'
theme/templates/_index.html
matomoTagOrig
=
'<!-- matomohead -->'
sed
-i
''
"/
${
matomoTagOrig
}
/r./.ci/analytics/head.html"
theme/templates/_index.html
matomoTagOrig
=
'<!-- matomopolicy -->'
sed
-i
''
"/
${
matomoTagOrig
}
/r./.ci/analytics/policy.html"
theme/templates/_index.html
matomoTagOrig
=
'<!-- matomobanner -->'
sed
-i
''
"/
${
matomoTagOrig
}
/r./.ci/analytics/gdpr-banner.html"
theme/templates/_index.html
fi
# install npm
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment