To utilise Smartzer’s GTM integration, please follow the steps below.
1. Ensure you have Google Tag Manager installed and running on the page where the player will be embedded.
2. Put the Smartzer SDK in the body of the page where the player will be embedded. The SDK code is
<script async src="https://scripts.smartzer.com/sdk/latest/embed.js"></script>
3. Add the following code snippet to the page, below the Smartzer SDK.
<script>
document.addEventListener('smrtzr:broadcast:analytics', function (e) {
if (window.dataLayer && Array.isArray(window.dataLayer)) {
window.dataLayer.push({ event: 'smrtzr_' + e.detail.analyticsType, analyticsData: e.detail });
}
});
</script>
You can test that events are firing correctly through the preview area of GTM.
A full list of events fired by Smartzer along with definitions can be found below.
All the Smartzer events should have the same data available:
event: the Smartzer event name
type: the Smartzer event type
projectId: the project id of the video/live stream/recording project
videoCurrentTime: the time in the video at which the event happened
data: data for the Smartzer event, unique to the Smartzer event
The following will explain the data contained in the data sections of the following events:
smrtzr_impression
smrtzr_impression
Occurs when loading the video player.
Data is empty
smrtzr_splashscreenLoadedEvent
smrtzr_splashscreenLoadedEvent
Occurs when the splashscreen has loaded in the player.
Data is empty.
smrtzr_splashscreenClickPlayEvent
smrtzr_splashscreenClickPlayEvent
Occurs when the user clicks on the splashscreen play button.
- InputDevice: the input device used to click on the splashscreen.
- Button: what button was clicked.
- TimeSinceSplashscreenLoaded: the time it took since the splashscreen loaded to click it.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
smrtzr_playerType
smrtzr_playerType
Occurs after the user has clicked the splashscreen play button and the video loads.
- PlayerType: the type of player being watched, can be “video”.
toggleMuteState
Occurs when the user clicks on the mute button in the playbar, or when the video loads.
- Muted: if the video is muted or not, can be “false” if the video is unmuted, and can be true if the video is muted.
- TimeSinceLastAction: time in seconds since last toggleMuteState occurred.
startPlayback
Occurs when the user has clicked on the splashscreen play button and the video has started playing.
- Format: format of the video being played.
- Resolution: the resolution of the video.
smrtzr_secondsWatched
smrtzr_secondsWatched
Occurs when the user has viewed a second of the video.
- Second: what is the current time in the video being watched is.
- TimesWatched: the number of times that second has been watched by the user.
smrtzr_playButtonClick
smrtzr_playButtonClick
Occurs when clicking on the play button.
- InputDevice: the input device used to click on the play button.
- Button: what button was clicked.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
- Playing: whether the video is currently playing or not.
smrtzr_togglePlayState
smrtzr_togglePlayState
Occurs when clicking on the play button.
- Playing: whether the video is currently playing or not.
- TimeSinceLastAction: time in seconds since last togglePlayState occurred.
seekbarMouseDown
Occurs when the user is clicking on the seek bar, and holding the left mouse button down.
- SeekFromTime: time in the video at which the user has clicked on the seek bar.
seekbarMouseUp
Occurs when the user has stopped clicking and holding on the seek bar.
- SeekToTime: the time in the video at which the user has stopped clicking and holding the mouse button.
smrtzr_seekEvent
smrtzr_seekEvent
Occurs when the user has clicked on the seek bar.
- VideoSeekFromTime: the time in the video at which the user has clicked on the seek bar.
- VideoSeekToTime: the time in the video at which the user has stopped clicking and holding the mouse button-
- TimeSkipped: the amount of time skipped in the video.
- Buffered: if the video is buffered or not.
- TimeSinceLastAction: time in seconds since the last action was performed in the video.
smrtzr_activeView
smrtzr_activeView
Occurs when the user has clicked on components of the playbar.
Data is empty
smrtzr_interactiveView
smrtzr_interactiveView
Occurs when the user has clicked on a tag in the video, or on the carousel components.
Data is empty
smrtzr_muteClick
smrtzr_muteClick
Occurs when clicking on the mute button.
- InputDevice: the input device used to click on the play button.
- Button: what button was clicked.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
smrtzr_volumeClick
smrtzr_volumeClick
Occurs when the user clicks on the volume bar.
- Volume: the current volume set in the video after the click.
smrtzr_volumeEvent
smrtzr_volumeEvent
Occurs when the user clicks on the volume bar.
- Volume: the current volume set in the video after the click.
- TimeSinceLastAction: time in seconds since last tooglePlayState occurred.
smrtzr_fullscreenClick
smrtzr_fullscreenClick
Occurs when the user clicks on the fullscreen button on the playbar.
- InputDevice: the input device used to click the fullscreen button.
- Button: what button was clicked.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
smrtzr_toggleFullscreenState
smrtzr_toggleFullscreenState
Occurs when the video enters or exits fullscreen mode.
- IsFullscreen: whether the video is fullscreen or not.
- TimeSinceLastAction: time in seconds since the last action was performed in the video.
smrtzr_openClick
smrtzr_openClick
Occurs when the user clicks on the carousel open/close button.
- InputDevice: the input device used to click on the play button.
- Button: what button was clicked.
- Open: if the carousel is opened or not.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
smrtzr_toggleOpenEvent
smrtzr_toggleOpenEvent
Occurs when the user clicks on the carousel open/close button.
- Open: if the carousel is opened or not.
- TimeSinceLastAction: time in seconds since last toogleOpenEvent occurred.
smrtzr_outboundClick
smrtzr_outboundClick
Occurs when the user clicks on a tag in the video.
- SectionClicked: What part of the tag was clicked.
- TagId: the tag ID.
- TagDesign: the ID of the image linked to the tag, if there is any.
- ItemId: the ID of the product, and what type of product it is.
- TimeSinceTagLoaded: time in seconds.
- CursorX: the position of the cursor on the X axis when the tag was clicked.
- CursorY: the position of the cursor on the Y axis when the tag was clicked.
smrtzr_openEvent
smrtzr_openEvent
Occurs when a popup opens from either a tag or from the carousel.
- ItemId: the ID of the product, and what type of product it is.
mainImageHover
Occurs when the user hovers the mouse over the main image in the popup.
- ItemId: the ID of the product, and what type of product it is.
- TimeSinceLastAction: time in seconds since the last mainImageHover occurred.
- Hovered: whether the mouse pointer has entered or left the main image of the popup.
smrtzr_closeTrigger
smrtzr_closeTrigger
Occurs when the user clicks to close the popup.
- InputDevice: the input device used to close the popup.
- Button: what button was clicked.
- CloseButtonTriggered: whether the popup close button was clicked to close the popup, can be true or false.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
smrtzr_closeEvent
smrtzr_closeEvent
Occurs when the popup closes.
- ItemId: the ID of the product, and what type of product it is.
- TimeSinceOpened: time in seconds since the popup has been opened.
smrtzr_itemClick
smrtzr_itemClick
Occurs when the user clicks on a product in the carousel.
- InputDevice: the input device used to click on the carousel product
button: what button was clicked.
- ItemId: the ID of the product that was clicked, and what type of product it was.
- CursorX: the position of the cursor on the X axis when the button was clicked.
- CursorY: the position of the cursor on the Y axis when the button was clicked.
smrtzr_scrollEvent
smrtzr_scrollEvent
Occurs when a user scrolls through the product list in a group.
- ItemId: the ID of the group that was scrolled through.
- ItemViewedId: what product in the group was scrolled.
smrtzr_buyNowHover
smrtzr_buyNowHover
Occurs when the user hovers the mouse over the popup’s CTA/Add To Cart button.
- ItemId: the ID of the product the user hover the mouse over the CTA/Add To Cart button over, and what type of product it was
- Hovered: whether the mouse pointer has entered or left the button on the popup
- Source: the popup type
smrtzr_clickThrough
smrtzr_clickThrough
Occurs when the user clicks on the popup’s CTA/Add To Cart button.
- ItemId: the ID of the product the user clicks the mouse the CTA/Add To Cart button on, and what type of product it was.
- Hovered: whether the mouse pointer has entered or left the button on the popup
- Source: the popup type
smrtzr_replayscreenLoadedEvent
smrtzr_replayscreenLoadedEvent
Occurs when the end of the video has been reached and the replay screen has loaded.
- TimesShown: the amount of times the replay screen has been shown in the video, increases every time the user reaches the replay screen.
smrtzr_videoEndedEvent
smrtzr_videoEndedEvent
Occurs when the video has ended.
- TimeSinceLastAction: time in seconds since the last action was performed in the video.
smrtzr_replayscreenClickPlayEvent
smrtzr_replayscreenClickPlayEvent
Occurs when the user clicks on the replay screen replay button.
- InputDevice: the input device used to click the replay screen replay button.
- Button: what button was clicked.
- TimeSinceReplayscreenLoaded: time in seconds since the replay screen has loaded in the video-
- TimesClicked: number of times the replay button has been clicked.
smrtzr_calendarClick
smrtzr_calendarClick
Occurs when the user clicks on the google or outlook buttons in the calendar dropdown on a live stream splash screen.
- Event: name of the livestream
- Link: link to either the google or outlook calendar
- CountdownDate: unix time of the start date and time of the stream from the
countdown timer
- Date: unix time of the current date and time