Skip to content

Commit

Permalink
move matomo tracking code
Browse files Browse the repository at this point in the history
  • Loading branch information
zzacharo committed Mar 16, 2023
1 parent 8be5760 commit 6e6f78c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
8 changes: 0 additions & 8 deletions demo-invenioils/invenio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ I18N_LANGUAGES = [
# ('fr', _('French'))
]

# Invenio-Theme
# =============
# See https://invenio-theme.readthedocs.io/en/latest/configuration.html

# Site tracking code template for matomo analytics
# Enable the below on the dedicated environment
# THEME_TRACKINGCODE_TEMPLATE = "demo_invenioils/trackingcode-prod.html"

###############################################################################
# Database
###############################################################################
Expand Down
15 changes: 0 additions & 15 deletions demo-invenioils/templates/demo_invenioils/trackingcode-prod.html

This file was deleted.

16 changes: 16 additions & 0 deletions demo-invenioils/ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!-- Matomo for https://invenioils.web.cern.ch/ -->
<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://webanalytics.web.cern.ch/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '235']);
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);
})();
</script>
<!-- End Matomo Code -->

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down

0 comments on commit 6e6f78c

Please sign in to comment.