In this topic, you will learn the use of the Google Analytics plugin and how it can be implemented using Studio and through custom coding.
The Brightcove Google Analytics plugin provides functionality to send data to Google Analytics. Note that the plugin supports both Google Analytics 4 and the older Universal Analytics. This document contains seven main content sections, those being:
Requirements: Requirements for using the Google Analytics Plugin v2.1.0 and newer.
Implement using Players module: Steps to follow to implement the plugin using Studio's Players module. Note that at this time configuration in the Players module must be done through the JSON Editor only. The user interface options are for Universal Analytics only.
The Google Analytics plugin first checks for the eventsToTrack option and the trackerID. If they're both present, it initializes GA and then listens for analytics-beacons and/or analytics_request events and on every player event, it checks if the event is present in the list of events to track. If it is, the plugin then gets the custom dimensions (that are also present in the paramsToTrack )associated with the event.
The events that are handled in the GA plugin and the custom dimensions associated with them are:
player_load - common custom dimensions
video_engagement - common custom dimensions + video_duration+video_range+seconds_viewed
video_impression - common custom dimensions
play_request - common custom dimensions
ad_start/ad_mode_begin - common custom dimensions
ad_end/ ad_mode_complete - common custom dimensions
error - common custom dimensions
video_view - common custom dimensions
video_complete - common custom dimensions
Custom dimensions include - video_account, video_player, video_session, video_platform_version, video_tags.
Brightcove Player Google Analytics Plugin v2.1.0 and newer requires the following:
Brightcove Player v7.0.0 or newer
Configuring Google Analytics
To configure Google Analytics integration, follow these steps:
Open the Players module.
Click the player name you want to configure to open the player properties.
Click Third-Party Analytics > Google Analytics in the left navigation menu.
Check Enable Google Analytics.
Click Sign In to Google Account.
Select the Google account to sign in with and enter your credentials if prompted.
Click Allow to let Brightcove access your Google account.
Use the Select Account dropdown to select the Google account to send tracking data to.
At this point in time (early 2023) both Google Analytics 4 and Universal Analytics are valid. The following is an example of dual tagging, where both Google Analytics 4 and Universal Analytics would function.
Dual tagging (both Google Analytics 4 and Universal Analytics)