Skip to content

Commit

Permalink
Adding matomo plugins which includes changes in the ignore-files
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausIllmayer committed Dec 4, 2024
1 parent c0d13af commit f9c3dc1
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vendor
report
components
plugins/*
!plugins/matomo*
composer.phar
composer.lock
tests/jena-fuseki*
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vendor
report
components
plugins/*
!plugins/matomo*
!README
composer.phar
composer.lock
Expand Down
13 changes: 13 additions & 0 deletions plugins/matomo-common/matomo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Matomo script
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.acdh.oeaw.ac.at/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '202']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
// End Matomo script
3 changes: 3 additions & 0 deletions plugins/matomo-common/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"js": ["matomo.js"]
}
13 changes: 13 additions & 0 deletions plugins/matomo-vocabs/matomo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Matomo script
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.acdh.oeaw.ac.at/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '77']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
// End Matomo script
3 changes: 3 additions & 0 deletions plugins/matomo-vocabs/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"js": ["matomo.js"]
}

0 comments on commit f9c3dc1

Please sign in to comment.