Google Analytics for Roku Channels


This Instant TV Channel walk-through applies only to Custom SDK Roku channels. As an alternative to Google Analytics, a limited amount of analytics information for both Custom SDK and Direct Publisher channels may be available in your Roku Developer Account by clicking the gear symbol to the right of your channel's name.

Google Analytics can be used to track video streaming, ads, purchases, screen views, and more, for any channel developed with Instant TV Channel. Events that occur on Roku devices running your channel will generate report data within your Google Analytics account.

Instant TV Channel supports both Google Analytics Version 4 (GA4) and Google Universal Analytics Version 3 (GA3). GA4 is recommended for all channels, as GA3 will be discontinued by Google on July 1, 2023.

The published version of your channel must be at Update #513 or later in order to use Google Analytics Version 4 (GA4)


Google Analytics Version 4 (GA4)

Prerequisites:

  1. An Instant TV Channel account with Developer Mode set to "Advanced".
  2. A Google Analytics account.

To add GA4 to an existing GA3 Analytics property, follow these easy steps:

  1. Within your Google Analytics account, select the property that you want to add GA4 to.
  2. Navigate to the Admin page.
  3. Click "GA4 Setup Assistant".
  4. Click "Get Started", beneath "I want to create a new Google Analytics 4 property"
  5. Click "Create Property". (Do not check "Enable data collection using existing global site tags".)
  6. Click "Go to your GA4 Property"
  7. On left menu, click Data Streams.
  8. Select the stream named "{Original Name} - GA4", where "{Original Name}" is the name of the old GA3 Analytics property.
  9. On the "Web stream details" page, record the Measurement ID. The Measurement ID always starts with "G-". The Measurement ID will be entered into your Instant TV Channel account in a later step.
  10. Click the "X" at the upper-left corner of the "Web stream details" page to close it.
  11. There should now be a new property named "{Original Name} - GA4", for example "My Roku Channel - GA4"
  12. Proceed with "To set up Instant TV Channel to use Google Analytics Version 4" below.

To create a new GA4 Analytics property, follow these easy steps:

  1. Log into https://analytics.google.com using an existing Gmail address.
  2. Click the "Start measuring" button.
  3. Enter an account name in the "Account name" box, for example "My Analytics Account", then click the "Next" button.
  4. Enter a property name in the "Property name" box, for example "My Roku Channel".
  5. Select a time zone and currency to be used on your reports, then click the "Next" button.
  6. Enter your business information, then click the "Create" button.
  7. If a "Terms of Service" box appears, click the "I also accept" checkbox and then the "I Accept" button.
  8. If a "My email communications" box appears, uncheck any categories that you do not want to receive email messages for, then click the "Save" button.
  9. Under "Choose a platform", click the "Web" button. DO NOT choose Android or IOS.
  10. Enter a "Website URL" and "Stream name", for example "roku.mydomain.com" and "My Channel Name". This information may appear on Google reports. The URL does NOT have to be a valid working URL, but the domain name ("mydomain.com") should be unique to you or your business
  11. Click the "Create stream" button.
  12. The "Web stream details" page should appear. Record the Measurement ID. The Measurement ID always starts with "G-". The Measurement ID will be entered into your Instant TV Channel account in a later step.
  13. Click the "X" at the upper-left corner of the "Web stream details" page to close it.

To set up Instant TV Channel to use Google Analytics Version 4 (GA4) follow these easy steps:

  1. Before configuring GA4 into your Roku channel, you must add GA4 to an existing GA3 Analytics property, or you must create a new GA4 Analytics property as described above.
  2. Log into your Instant TV Channel account.
  3. If your Developer Mode is not already set to "Advanced", select Account from the navigation links along the left side of the page, change Developer Mode to "Advanced", then click Save.
  4. Select Channels from the navigation links along the left side of the page.
  5. Select the channel that you want to track.
  6. Enter the Theme Editor by selecting Theme from the navigation links along the left side of the page.
  7. Scroll down towards the bottom of the parameter list until you see several GATracker parameters.
  8. Change GATrackerEnabled to True.
  9. Enter your Google Analytics Measurement ID into GATrackerMeasurementId. A Google Analytics Measurement ID will always start with "G-". If you are tracking several channels, you will probably want to use a separate Measurement ID for each channel.
  10. Optionally set GATrackerDebug to True to enable Google Analytics DebugView.
  11. Google Analytics Version 4 (GA4) tracking is now enabled for all installed copies of the channel. It is not necessary to re-package or re-upload to the Roku channel store if the published version of the channel is at Update #513 or later.

The following table contains a brief description all Roku events recorded by Google Analytics Version 4 (GA4).

Roku Channel Event Description Google Analytics Event Name Google Analytics Parameters
Ad Complete A VAST ad was completely streamed. ad_impression ad_title, ad_url, ad_id, ad_position (0=preroll, -1=postroll, other=midroll seconds), ad_count (Number of ads in adpod)
Ad Fill A VAST ad request was filled. ad_fill ad_title, ad_url, ad_id, ad_position (0=preroll, -1=postroll, other=midroll seconds), ad_count (Number of ads in adpod)
Ad No-Fill A VAST ad request was not filled. ad_nofill ad_title, ad_url, ad_id, ad_position (0=preroll, -1=postroll, other=midroll seconds)
Ad Partial A VAST ad was partially streamed. ad_query ad_title, ad_url, ad_id, ad_position (0=preroll, -1=postroll, other=midroll seconds), ad_count (Number of ads in adpod)
Ad Query A VAST ad was requested for the channel. ad_query ad_title, ad_url, ad_id, ad_position (0=preroll, -1=postroll, other=midroll seconds)
Adpod Too Big A VAST response was ignored because it contained an adpod that exceeded the non-zero Theme "AdPodLimit". ad_bigpod ad_title, ad_url, ad_id, ad_position (0=preroll, -1=postroll, other=midroll seconds), ad_count (Number of ads in adpod)
Channel Error A content URL could not be streamed (class="content") or the channel could not be started (class="fatal"). channel_error error_class ("content" or "fatal"), error_code, error_detail (Description of error), error_uid (UID of invalid content item)
Deep Link A deep link into the channel occured. deeplink deeplink_contentid, deeplink_mediatype, deeplink_error
Focus An item was brought into focus using the remote control. focus focus_class ("Grid Item", "Horizontal List Item", "Series List Item", "Vertical List Item"), focus_name (shortDescriptionLine1), focus_uid (Content UID)
In App Purchase An in-channel purchase was made. Only supports US$ for GA4 value calculations. in_app_purchase product_id, purchase_uid (Roku 36-character purchase ID), price (With currency symbol), value (Number ony)
Password Entered A password was entered. password_check password_result ("pass" or "fail"), password_name (shortDescriptionLine1), password_uid (Content UID of the passworded item), password_interrogate (If the password screen was displayed)
Screen Change A new screen was displayed. screen_view firebase_screen (Title if Springboard, otherwise shortDescriptionLine1), firebase_screen_class (Screen type, for example "Springboard" or "Grid"), firebase_screen_id (Content UID)
Search Query An in-channel search was entered. This will usually include each keypress. search_query search_term
Search Result Selected An in-channel search result was selected. search_select search_term, video_title, video_uid (Content UID)
Video Complete A video has completely streamed. Does not include any postroll ad or outro after the video. video_complete autoplay (If this video was automatically streamed), video_current_time (Position in seconds), video_deeplink (Deeplink ID, if this video was deeplinked), video_duration (Length in seconds), video_percent (Position percentage), video title, video_uid (Content UID), video_url
Video Progress A video is continuing to stream. Occurs at 10%, 25%, 50% and 75% positions. video_progress autoplay (If this video was automatically streamed), video_current_time (Position in seconds), video_deeplink (Deeplink ID, if this video was deeplinked), video_duration (Length in seconds), video_percent (Position percentage), video title, video_uid (Content UID), video_url
Video Start A video started to stream. Does not include any preroll ad or intro before the video. video_start autoplay (If this video was automatically streamed), video_current_time (Position in seconds), video_deeplink (Deeplink ID, if this video was deeplinked), video_duration (Length in seconds), video_percent (Position percentage), video title, video_uid (Content UID), video_url
Italics = Parameter is only present if needed.


Google Universal Analytics Version 3 (GA3)

Prerequisites:

  1. An Instant TV Channel account with Developer Mode set to "Advanced".
  2. A Google Analytics account with a Universal Analytics Property set up in "Web" mode, not "App" mode.
  3. When setting up the Universal Analytics Property in your Google account you can use any name for the website, for example "roku.mychannel.com". It should not be an actual website.
  4. The following directions from Google may be helpful in setting up a Universal Analytics Property: https://support.google.com/analytics/answer/10269537

To set up Instant TV Channel to use Google Univercal Analytics Version 3 (GA3) follow these easy steps:

  1. Log into your Instant TV Channel account.
  2. If your Developer Mode is not already set to "Advanced", select Account from the navigation links along the left side of the page, change Developer Mode to "Advanced", then click Save.
  3. Select Channels from the navigation links along the left side of the page.
  4. Select the channel that you want to track.
  5. Enter the Theme Editor by selecting Theme from the navigation links along the left side of the page.
  6. Scroll down towards the bottom of the parameter list until you see several GATracker parameters.
  7. Change GATrackerEnabled to True.
  8. Enter your Google Universal Analytics Tracking ID into GATrackerAccount. A Google Universal Analytics Tracking ID will always start with "UA-". If you are tracking several channels, you will probably want to use a separate Tracking ID for each channel.
  9. Enter a name into GATrackerHostName. This name appears on the Google Analytics reports as the "Hostname".
  10. Google Universal Analytics Version 3 (GA3) tracking is now enabled for all installed copies of the channel. It is not necessary to re-package or re-upload to the Roku channel store.

The following tables illustrate how Google Universal Analytics Version 3 (GA3) reports are populated based on Page Views and Events occuring in your Roku channel. In order to improve reporting accuracy, items marked with a "*" are no longer available as of Update 276.

Pages Viewed (Roku Player Screens) Page Title Page URL Event Label (Screen Type)
Main screen of SceneGraph or Classic channel type Top Screen Top Screen Horizontal List
Main screen of Vertical channel type Top Screen Top Screen Vertical List
Main screen of Grid channel type Top Screen Top Screen Grid
Episode List of Series channel type Top Screen Top Screen Series
Grid SDL1 SDL1 Grid
Horizontal List SDL1 SDL1 Horizontal List
Vertical List SDL1 SDL1 Vertical List
MRSS Feed SDL1 SDL1 MRSS Feed
Series Episode List SDL1 SDL1 Series
Springboard Title Content URL Springboard
Registration Title or SDL1 Content URL or SDL1 Registration
Password Title or SDL1 Content URL or SDL1 Password
Video Title Content URL Video
AutoPlay Title Content URL AutoPlay
Picture SDL1 SDL1 Picture
Text SDL1 SDL1 Text
Italics = Literal Text Constant, SDL1 = Content ShortDescriptionLine1

Events Page Title Page URL Event Label Event Category Event Action User Defined Value Event Value
Channel Start Channel Start Version Roku Model . Display Type Channel Model.Display Serial  
* Channel Enter Channel Enter Channel Enter Version Channel Enter Serial  
* Roku Player Display Channel Display Channel Display Display Type Channel Display Type Serial  
* Roku Player Model Channel Model Channel Model Model Name Channel Model Name Serial  
* Roku Player Firmware Channel Firmware Channel Firmware Firmware Version Channel Firmware Version Serial  
Channel Exit Channel Exit Channel Exit Version Channel Exit Serial
Video Playback Start/Restart Title Content URL ContentId Button Video Start Serial Position
Video Playback Resume Title Content URL ContentId Button Video Resume Serial Position
Video Playback Pause Title Content URL ContentId Button Video Pause Serial Position
Video Playback Stop/Incomplete Title Content URL ContentId Button Video Stop Serial Position
Video Playback Stop (Live) Title Content URL ContentId Status Video Stop Serial 0
Video Playback Complete Title Content URL ContentId Status Video Complete Serial Position
Video Play All Title Content URL ContentId Button Video Play All Serial  
Video Heartbeat (if enabled) Title Content URL ContentId Button Video Heartbeat Serial Position
Audio Playback Start Title Content URL ContentId Button Audio Start Serial  
Audio Playback Restart Title Content URL ContentId Button Audio Restart Serial  
Audio Playback Resume Title Content URL ContentId Button Audio Resume Serial  
Audio Playback Complete Title Content URL ContentId Status Audio Complete Serial  
Audio Playback Pause Title Content URL ContentId Button Audio Pause Serial  
Audio Play All Title Content URL ContentId Button Audio Play All Serial  
AutoPlay Start SDL1 SDL1 AutoPlay Start Status AutoPlay Start Serial  
AutoPlay Resume (Pause/Play key) Title Content URL ContentId Button AutoPlay Resume Serial Position
AutoPlay Replay (Replay key - replay current pgm) Title Content URL ContentId Button AutoPlay Replay Serial Position
AutoPlay Restart (Back key - restart 1st pgm) Title Content URL ContentId Button AutoPlay Restart Serial  
AutoPlay Pause (Pause/Play key) Title Content URL ContentId Button AutoPlay Pause Serial Position
AutoPlay Complete (occurs for each item streamed) Title Content URL ContentId Status AutoPlay Complete Serial Position
AutoPlay Stop (Up key) Title Content URL ContentId Button AutoPlay Stop Serial  
AutoPlay Skip Ahead (FF key) Title Content URL ContentId Button AutoPlay Skip Ahead Serial  
AutoPlay Skip Back (Rew key) Title Content URL ContentId Button AutoPlay Skip Back Serial  
Ad Click (Banner) Title Ad URL Ad Click Button Ad Click Serial  
Ad Complete (Video) Title Ad URL ContentId Status Ad Complete Serial Position
Ad Partial (Video) Title Ad URL ContentId Status Ad Partial Serial Position
Ad No-Fill (LiveRail) Title Publisher ID ContentId Status No LiveRail ads available for this ad request Serial  
Ad No-Fill (VAST) Title Ad URL ContentId Status No VAST ads available for this ad request Serial  
Ad No-Fill (Vidillion) Title Ad URL ContentId Status No Vidillion ads available for this ad request Serial  
Ad Request (LiveRail) Title Publisher ID ContentId Status LiveRail ad request Serial  
Ad Request (VAST) Title Ad URL ContentId Status VAST ad request Serial  
Ad Request (Vidillion) Title Ad URL ContentId Status Vidillion ad request Serial  
Password Check (if enabled) Title or SDL1 Content URL or SDL1 Pass or Fail Status Password Check Serial  
Registration Check (if enabled) Title or SDL1 Content URL or SDL1 Pass or Fail Reason Status Registration Check Serial  
Registration Command Title or SDL1 Content URL or SDL1 Command Description Status Registration Check Serial  
Schedule Start SDL1 SDL1 Schedule Start Status Schedule Start Serial  
Schedule Stop (Up/Back key) SDL1 SDL1 Schedule Stop Button Schedule Stop Serial  
Search Search Search Search Query Button Search Query Serial  
Various Error Events Title or SDL1 Content URL if applicable ContentId or Error Message Error Error Message Serial  
Italics = Literal Text Constant, SDL1 = Content ShortDescriptionLine1, Serial = Player Serial Number

Please see this short guide for more information about how to build a Roku channel using Instant TV Channel.

Your comments, suggestions or criticisms about this Roku developer information can be emailed to .

Instant TV Channel is a cloud-based tool for Roku developers and content providers that shortens development time and eases maintenance after deployment.



Access Code: ID1
Check out Instant TV Channel by adding our latest demonstration channel to your Roku player, or watch the YouTube video.

Need help with your Roku?

We are unable to provide technical support for your Roku device.

Please visit www.roku.com for assistance.



Instant TV Channel is not affiliated with nor endorsed by Roku Inc.