Soundcloud media tracking

Here you can see an embedded Soundcloud audio track. Play it, pause or seek within the track to see what Google Tag Manager event names and variables are being shown for specific user interactions.

You should see the following events and variables:

  • gtm4wp.mediaPlayerReady – one specific player is ready to be used. You will see several event variables attached:
    • mediaType will be set to soundcloud
    • mediaData.id will be set to the unique ID of the media on Soundcloud
    • mediaData.author will be set to the username of the Soundcloud uploader
    • mediaData.title will be set to the title of the Soundcloud media
    • mediaData.url will include the Soundcloud URL of the media
    • mediaData.duraction will be set to the length of the media in seconds
  • gtm4wp.mediaPlayerStateChange will fire each time the player started playing, or if it is paused, stopped or it is buffering. Next to the variables above, you will see some additional variables:
    • mediaPlayerState: play, ended, pause or seeked
    • mediaCurrentTime: the time index where the player is currently playing the media
  • gtm4wp.mediaPlayerEvent – an event happening in the player during or before playback. Next to the variables above, you will see the following variables:
    • mediaPlayerEvent: click-download, click-buy, open-share-panel, error
    • mediaPlayerEventParam: if there is any additional data attached to the event name in mediaPlayerEvent, you will see it here
  • gtm4wp.mediaPlaybackPercentage – while the media plays, this event will fire each time the user watched 10% more seconds of the media. In addition to the variables above, you will have this as well:
    • mediaPercentage: the percentage the media was already played