MP3 Audio Player
Search for articles about the Audio Player and WordPress Theme

Use Google Analytics to track Audio Player statistics

Starting from version 3.1, MP3 Audio Player Pro allows you to connect the players to your Google Analytics (GA4) so you will have the ability to view real-time and past events of a number of plays and downloads right into your Google Analytics reports.

In this tutorial, we assume you have already created your Google Analytics account and you have entered your Tracking code in WP-Admin > MP3 Player > Stats & Report > Tracking Code. See below.

Setup for GA4 #

In this quick tutorial, we’ll learn how to add the tracking events we use in MP3 Audio Player Pro into GA4. Our tracking events are event_category which represents your playlist/podcast name, and the event_label which represents the audio track title.

First, you will need to setup “custom dimensions” in GA4 for the website. Additionally, we’ll create a custom report for these dimensions. Custom dimensions allow you to add additional data to your events, making it easier to analyze specific aspects of user interaction. Please note that you only have to do this 1-time for your site (not for each playlist).

Step 1 – Set up custom dimensions in GA4

  1. Sign in to your Google Analytics account.
  2. Go to the Admin panel by clicking the Cog Icon in the bottom left of your screen.
  3. Click on the property where you want to add custom dimensions.
  4. Click on “Custom Definitions” in the left-hand menu, then click on “Create Custom Dimensions” blue button.
  5. You will create 2 dimensions. Fill in the following information:
    – For the playlist attribute
    Dimension name: Playlist
    Scope: Event
    Event parameter: event_category

    – For the audio track attribute
    Dimension name: Audio Track
    Scope: Event
    Event parameter: event_label
  6. Click “Save”.

Step 2 – Create a custom exploration report in GA4

Please note that when you setup your report, the stats will NOT show up until the next 24 hours! If you don’t see the stats, make sure to wait 24 hours before the stats start to appear. So you might want to wait 24 hours before creating your first report.

See Video on how to setup a Custom Exploration Report once you have waited 24 hours.

Setup for UA (Deprecated) #

Universal Analytics has been deprecated in favor of GA4. Please see Setup for GA4 instead. Documentation below will be removed soon.
In Google Analytics, you can now see real-time events, as well as past events of plays and downloads for each playlist but also for each track.

Realtime View:

To view real-time events, a.k.a. “what is being played on your website right now”, go to Realtime > Events > Events (Last 30 min)

Here you can see that the Playlist (or Podcast Show) called Dr. Death | S1: Dr.Duntsch has been played 4 times during the last 30 minutes, and there was 1 download for the Playlist called Epigram.

If you click that Playlist name, you will see which specific tracks have been played or downloaded:

You can see that 2 tracks of the Dr Death | S1 have been played 2 times each during the past 30 minutes.

Overall View

If you want to see all stats for a certain periode of time, go to Behavior > Events > Top Events

Above, you can see that during the period of December 21 to December 22, there have been 31 total events that include both play and downloads. Between these numbers, you can see that Dr.Death Playlist has been played 11 times and 1 person has downloaded a track in the Epigram Playlist.

If you click on each playlist, you will see details of which track have been played or downloaded.

Most Played Track

If you wish to view top most played or downloaded tracks, click Event Label.

An important notion in GA is that Event Category = Playlist Names, Event Label = Track Names and Event Action = Type of the event such as a Play or a Download.

Save Report to Dashboard

Google Analytics can be customized is hundreds of ways and sometimes it can be an overwhelming task just to set up the reports. We recommend you add your favorite widget table to your Analytic Dashboard for quick access.

Watch Video to learn how to save a widget to GA Dashboard

Updated on April 2, 2024
Was this article helpful?
Still Stuck?
We can help.