Commit c02df3ea authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

Merge branch 'add-matomo' into 'develop'

Add matomo

See merge request R3/school/courses!83
parents 2171bc2b 6e8956ff
<div id="lap-cookies-banner" class="presentation-banner">
<div class="banner-intro">
<div class="close-button">
<a class="lap-refuse">
<i class="fa fa-times" aria-hidden="true"></i>
<div class="banner-img">
<img src="" type="image/svg+xml"/>
<div class="banner-title">This website needs some cookies and similar means to function.</div>
<div class="banner-text">If you permit us, we will use those means to collect data on your visits for aggregated
statistics to improve our service.
<div class="banner-buttons">
<a class="btn lap-accept">Accept cookies for aggregated statistics</a>
<a class="btn lap-refuse">No thanks, only technically necessary cookies</a>
<a class="btn lap-cookies-more" href="">More information</a>
\ No newline at end of file
const settings = {
expires: "180",
matomoURL: "",
siteID: "8", //you get this siteID by sending an email to
accept_all_text: "Aggregate statistics cookies accepted",
only_necessary_text: "Only necessary cookies accepted",
doNotTrack_text: "Do Not Track is enabled",
cookieName: "lap",
bots: /bot|crawler|spider|crawling/i,
timeout_hidebanner: "500",
<script src=""></script>
<script src=""></script>
<link rel="stylesheet" type="text/css" href="" />
<div class="bottomPrivacy">
<a href="">Privacy Policy</a>
(<span id="doNotTrack-text"><span id="gdpr-result-text"></span> - <a href="javascript: showBanner();">change</a></span>)
\ No newline at end of file
......@@ -47,6 +47,16 @@ do
ln -s ../../theme/package.json package.json
ln -s ../../theme theme
# add matomo
if [[ -v matomoID ]]; then
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
# install npm
yarn global add grunt-cli generator-reveal
yarn install
......@@ -46,7 +46,7 @@ def main(date, name):
click.echo(' > Directory for slides {0} created.' . format(slidesPath))
click.echo(' > Directory for slides{0} already exists.' . format(slidesPath))
click.echo(' > Directory for slides {0} already exists.' . format(slidesPath))
# change to the root directory of the presentation
......@@ -55,6 +55,13 @@ def main(date, name):
createSymlink('../../theme', 'theme')
createSymlink('../../theme/package.json', 'package.json')
# reset the theme
os.system('git checkout -- templates/_index.html')
click.echo(' > Theme reset.')
# copy the contents of the template folder
if not os.path.isfile(os.path.join(fullPath, 'slides', '')):
copy_tree(os.path.join(rootDir, 'template', 'slides'), slidesPath)
......@@ -79,6 +86,13 @@ def main(date, name):
click.echo(' > All dependencies already installed.')
# add analytics
os.system('sed -i "/matomohead/r./../../.ci/analytics/head.html" theme/templates/_index.html')
os.system('sed -i "/matomopolicy/r./../../.ci/analytics/policy.html" theme/templates/_index.html')
os.system('sed -i "/matomobanner/r./../../.ci/analytics/gdpr-banner.html" theme/templates/_index.html')
click.echo(' > Matomo added.')
# launch the server
os.system('grunt server')
theme @ 8c78d6ca
Subproject commit f2a496a345b21a440f73acba2181ae2cd2a1e05c
Subproject commit 8c78d6caeb5aa478e3928ad01c158c0060f1f81c
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment