***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Invenio Theme TUW
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Center for Research Data Management
Invenio Theme TUW
Commits
3a2da54a
Commit
3a2da54a
authored
4 years ago
by
Moser, Maximilian
Browse files
Options
Downloads
Patches
Plain Diff
Add JS snippet for Matomo analysis in the base page template
parent
579c4dd7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
invenio_theme_tuw/config.py
+6
-0
6 additions, 0 deletions
invenio_theme_tuw/config.py
invenio_theme_tuw/templates/invenio_theme_tuw/page.html
+20
-1
20 additions, 1 deletion
invenio_theme_tuw/templates/invenio_theme_tuw/page.html
with
26 additions
and
1 deletion
invenio_theme_tuw/config.py
+
6
−
0
View file @
3a2da54a
...
@@ -10,6 +10,12 @@
...
@@ -10,6 +10,12 @@
THEME_TUW_LOCAL_LOGIN_ENABLED
=
True
THEME_TUW_LOCAL_LOGIN_ENABLED
=
True
"""
Controls whether or not to display the form fields for login via email/password.
"""
"""
Controls whether or not to display the form fields for login via email/password.
"""
THEME_TUW_MATOMO_ENABLED
=
True
"""
Controls whether or not to include the JS snippet for Matomo in the base template.
"""
THEME_TUW_MATOMO_URL
=
"
http://s191.dl.hpc.tuwien.ac.at/
"
"""
The URL under which Matomo is reachable.
"""
APP_THEME
=
[
"
semantic-ui
"
]
APP_THEME
=
[
"
semantic-ui
"
]
...
...
This diff is collapsed.
Click to expand it.
invenio_theme_tuw/templates/invenio_theme_tuw/page.html
+
20
−
1
View file @
3a2da54a
...
@@ -54,7 +54,26 @@
...
@@ -54,7 +54,26 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]-->
{%- endblock css %}
{%- endblock css %}
{%- block tuw_metadata %}{%- endblock tuw_metadata %}
{%- block tuw_metadata %}{%- endblock tuw_metadata -%}
{%- block tracking %}
{%- if config.get("THEME_TUW_MATOMO_ENABLED", False) %}
<!-- Matomo -->
<script
type=
"text/javascript"
>
var
_paq
=
window
.
_paq
=
window
.
_paq
||
[];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq
.
push
([
'
trackPageView
'
]);
_paq
.
push
([
'
enableLinkTracking
'
]);
(
function
()
{
var
u
=
"
{{ config.get('THEME_TUW_MATOMO_URL') }}
"
;
_paq
.
push
([
'
setTrackerUrl
'
,
u
+
'
matomo.php
'
]);
_paq
.
push
([
'
setSiteId
'
,
'
1
'
]);
var
d
=
document
,
g
=
d
.
createElement
(
'
script
'
),
s
=
d
.
getElementsByTagName
(
'
script
'
)[
0
];
g
.
type
=
'
text/javascript
'
;
g
.
async
=
true
;
g
.
src
=
u
+
'
matomo.js
'
;
s
.
parentNode
.
insertBefore
(
g
,
s
);
})();
</script>
<!-- End Matomo Code -->
{% endif -%}
{% endblock tracking -%}
{%- endblock head %}
{%- endblock head %}
</head>
</head>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment