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
ecdd2142
Verified
Commit
ecdd2142
authored
Jul 07, 2020
by
Laurent Heirendt
✈
Browse files
add matomo to courses
parent
410d11cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
.ci/deploy.sh
View file @
ecdd2142
...
@@ -47,6 +47,27 @@ do
...
@@ -47,6 +47,27 @@ do
ln
-s
../../theme/package.json package.json
ln
-s
../../theme/package.json package.json
ln
-s
../../theme theme
ln
-s
../../theme theme
# 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
fi
# install npm
# install npm
yarn global add grunt-cli generator-reveal
yarn global add grunt-cli generator-reveal
yarn
install
yarn
install
...
...
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