Email. hello@digitalelite.co.uk | Tel. 020 8050 1385

Google Analytics

Enabling Google Analytics Integration under Settings automatically instructs WPS3Files to send the following events to your Google Analytics integration:

  • Video Played
  • File Downloaded
  • File Uploaded

These analytics events work regardless of your display settings (i.e. they work for both the wpmedia_list and wpmedia_cards shortcodes).

Setup

Other than enabling the checkbox there is no further configuration required other than to ensure Google Analytics is running on your site. Google Analytics can be deployed directly on your website, or through Google Tag Manager, both deployments will work. As long as the ga() function is exposed on your site, which is standard amongst all common Google Analytics deployment methods, this functionality will work correctly.

when someone clicks a file link, wps3files fires an event like the below

ga("wpS3FilesButtonClick.send", "event", "WPS3Files Plugin", "File Downloaded", "annual_conference.pdf")

Event Parameters

WPS3Files sends events with the Action, Category and Label parameters pre-populated as follows:

 

File Download

Parameter GA URL Parameter Example
eventAction (&ea) File Downloaded
eventCategory (&ec) WPMedia Plugin
eventLabel (&el) annual_conference.pdf

 

File Search

Parameter GA URL Parameter Example
eventAction (&ea) Search
eventCategory (&ec) WPMedia Plugin
eventLabel (&el) lion king

Advanced Users & Troubleshooting

For advanced users, Google Analytics also provides a Chrome extension that can enable the debug version of analytics.js without requiring you to change your tracking code. This allows you to debug your own sites and also see how other sites have implemented Google Analytics tracking with analytics.js.

This extension loads the debug version of the Google Analytics Javascript for all sites you browse using Google Chrome. It prints useful information to the Javascript console. These messages include error messages and warnings which can tell you when your analytics tracking code is set up incorrectly. In addition, it provides a detailed breakdown of each tracking beacon sent to Google Analytics.

For more information on tracking events in analytics see Google Analytics Event Tracking.