About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:usage_stats

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
configuration:usage_stats [2020/09/22 14:33] demiankatzconfiguration:usage_stats [2022/12/19 21:40] – Added image captions maccabee
Line 20: Line 20:
  
 In addition to the above tips Google Spreadsheet now has an [[https://developers.google.com/analytics/solutions/google-analytics-spreadsheet-add-on|Add-on for Google Analytics]]. You can create custom analytics reports and then create an analytics dashboard on your website using those custom charts for your administrative users to view.   In addition to the above tips Google Spreadsheet now has an [[https://developers.google.com/analytics/solutions/google-analytics-spreadsheet-add-on|Add-on for Google Analytics]]. You can create custom analytics reports and then create an analytics dashboard on your website using those custom charts for your administrative users to view.  
-===== Matomo/Piwik ===== 
  
-[[https://matomo.org/|Matomo]] (formerly called Piwik) is an open source project which offers similar functionality to Google Analytics but allows the data to be collected to a locally-hosted server rather than a third-party service. For libraries with concerns about privacy and applications of user-generated data, this may be a preferred option. The [Piwik] section of [[configuration:files:config.ini|config.ini]] allows simple integration with a Matomo/Piwik server.+===== Matomo 4+ ===== 
 + 
 +// Available starting with VuFind 8.0. // 
 + 
 +(see also legacy Piwik/Matomo 3.x support below) 
 + 
 +[[https://matomo.org/|Matomo]] (formerly called Piwik) is an open source project which offers similar functionality to Google Analytics but allows the data to be collected to a locally-hosted server rather than a third-party service. For libraries with concerns about privacy and applications of user-generated data, this may be a preferred option. The [Matomo] section of [[configuration:files:config.ini|config.ini]] allows simple integration with a Matomo server.  
 + 
 +Enabling tracking with [Matomo] section instead of the legacy [Piwik] section is recommended whenever possible, as it uses newer tracking code and also provides support for Custom Dimensions in Matomo. Matomo recommends using Custom Dimensions instead of Custom Variables. See https://matomo.org/docs/custom-dimensions/ for more information. 
 + 
 +==== Tips and Notes ==== 
 + 
 +Custom Variables and Custom Dimensions are not tracked when the content is loaded using AJAX (for example, when using AJAX tabs on the record view, or when tabs or accordion segments are loaded with the list view set to "tabs" or "accordion" in the [List] section of [[configuration:files:searches.ini|searches.ini]]). If you wish to track the custom variables in this case too, change 'lightbox' to an empty string in the matomo call in lightbox.phtml. 
 + 
 +[[https://github.com/vufind-org/vufind/blob/dev/themes/bootstrap3/templates/layout/lightbox.phtml|themes/bootstrap3/templates/layout/lightbox.phtml]]: 
 + 
 +Replace (line 3): 
 + 
 +<code> 
 +<?=$this->matomo(['context' => $this->layoutContext ?? 'lightbox'])?> 
 +</code> 
 + 
 +with: 
 + 
 +<code> 
 +<?=$this->matomo(['context' => $this->layoutContext ?? ''])?> 
 +</code> 
 + 
 +This may skew your results in unpredictable ways, so be sure to test carefully. It may be necessary to create a special custom layout template and adjust additional code if you wish to track AJAX statistics in some cases but not others. 
 + 
 + 
 +===== Piwik/Matomo 3.x ===== 
 + 
 +The [Piwik] section of [[configuration:files:config.ini|config.ini]] allows integration with legacy Piwik/Matomo 3.x. However, enabling tracking with [Matomo] section as described above is recommended whenever possible
  
 ==== Tips and Notes ==== ==== Tips and Notes ====
Line 43: Line 75:
  
 This may skew your results in unpredictable ways, so be sure to test carefully. It may be necessary to create a special custom layout template and adjust additional code if you wish to track AJAX statistics in some cases but not others. This may skew your results in unpredictable ways, so be sure to test carefully. It may be necessary to create a special custom layout template and adjust additional code if you wish to track AJAX statistics in some cases but not others.
 +
 +===== Google Tag Manager =====
 +
 +// Available starting with VuFind 9.0. //
 +
 +[[https://tagmanager.google.com/#/home|Google Tag Manager]] is a platform for deploying a variety of Javascript code snippets ("tags") onto a website/webapp based on specific criteria ("triggers"). It supports [[https://support.google.com/tagmanager/answer/9442095|built-in tags for Google Analytics v4]] (and earlier, deprecated versions) as well as a community-provided library of tags that [[https://tagmanager.google.com/gallery/#/owners/trackify-info/templates/GoogleTagManager-WebTemplate-Matomo|includes Matomo]].
 +
 +Configure VuFind's out-of-the-box support for GTM through the [GoogleTagManager] section of [[configuration:files:config.ini|config.ini]].
 +
 +==== Enhanced UI Tracking with GTM and GA4 ====
 +
 +Event Tracking in GA can be used to measure the use of particular UI features beyond page navigation.  GTM makes it possible to do this without any custom Javascript.  For example, this example GTM tag and trigger record the use of the "record navigation" / "action toolbar" buttons like "Cite this" and "Text this".
 +
 +{{:configuration:gtm_tag.png?400|Tag Configuration panel showing Tag Type is GA4 Event, Event Name is "click", Event Parameters are "section" => "action_toolbar" and "link_text" => a GTM variable "Click Text"}}
 +
 +{{:configuration:gtm_trigger.png?400|Trigger Configuration panel showing Trigger Type is "Click - All Elements" and the trigger fires on "Click Element matches CSS selector .record-nav a"}}
  
 ===== Built-In Statistics Collection ===== ===== Built-In Statistics Collection =====
Line 59: Line 107:
  
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
configuration/usage_stats.txt · Last modified: 2023/11/09 19:18 by demiankatz