Skip links

Tracking Audio with Goal Tracker for Google Analytics

Goal Tracker for Google Analytics allows you to track embedded audio files on your website.

You can track your website’s audio player and get data about who listened to your music or podcasts.

Setting up Audio Tracking

Go to the plugin’s Video/Audio tracking tab and toggle the Track Self-Hosted Audio option:

Once saved, the plugin will start tracking all of the embedded audio files (these are the files that you uploaded and embedded through the media library).

Audio Events in Google Analytics

There are 3 audio events that the plugins generate:

audio_start – This will trigger each time a visitor clicks play.

audio_progress – Sent when the audio progresses to 10%, 25%, 50% and 75% of the file.

audio_complete – Sent when the audio file finished playing.

Each event will include the following parameters:

Audio Event Parameter

audio_current_time – Current time in the audio file when the event was sent.

audio_duration – The full duration of the audio file.

audio_title – The file name.

audio_percent – Indicates the progress (0, 10, 25, 50, 75, 100)

audio_provider – “self_hosted”

audio_url – The URL of the file.

Configuring the custom metrics and dimensions

Because audio events are not pre-configured in Google Analytics GA4, you will have to configure them on Google Analytics before you can use the data.

To set up the custom events and dimensions, head over to Google Analytics, then open the “Admin” settings, and click on Custom Definitions:

Google Analytics Custom Definitions

Create the following dimensions using the “Create custom dimensions” button:

Dimension NameScopeDescriptionEvent Parameter
audio_titleEventAudio Titleaudio_title
audio_providerEventAudio Provideraudio_provider
audio_urlEventAudio URLaudio_url

An example:

Then, create a custom metric using the “Create custom metric” button:

Metric NameScopeDescriptionEvent ParameterUnit
audio_current_timeEventAudio Current Timeaudio_current_timeSeconds
audio_durationEventAudio Durationaudio_durationSeconds
audio_percentEventAudio Percentaudio_percentStandard

For example: