Google Analytics is a popular, and proprietary analytics platform for measuring web traffic to a site. VIVO supports Google Analytics through a Freemarker Template dedicated for the purpose. You will need to sign up for Google Analytics, and use your site domain and your key as part of the configuration.
Google Analytics is not required. If you do not wish to implement Google Analytics, please skip this section.
The method described below is a customization of VIVO. This customization will be lost in an upgrade, or code refresh unless you preserve it and reapply the customization after an upgrade. A method for preserving customizations during an upgrade can be found here: Preserving Customizations During Build. It is best to plan ahead to preserve customizations. |
googleAnalytics.ftl
To implement Google Analytics for VIVO, follow the steps below.
googleAnalytics.ftl
from the default theme (wilma) found here: ./webapp/src/main/webapp/themes/wilma/templates/googleAnalytics.ftl
googleAnalytics.ftl
in the theme you are using. Provide your domain name, your page tracker key, and your roll-up tracker key.mvn install -Dskiptests
It is possible to use other analytics platforms. For example, if you want to use Matomo, you can substitute the tracking script from Google Analytics with the one provided by Matomo.