There are two main parts to setting up tracking for Scene7 videos. 

  1. Using TrackingManager to enable or disable tracking events.
  2. Defining a function called "s7ComponentEvent" to handle event tracking


There shouldn't be anything to do with the TrackingManager Component, but it is good to be aware. 

The "TrackingManager" Component is used to define which events should and should not be tracked. By default all events are tracked automatically. Auto-tracked video events include:

  • LOAD
  • PLAY
  • MILESTONE (25/50/75/0) 

Presently the TrackingManager component only supports "enabletracking" and 
"disabletracking" modifiers. Each setting takes a comma-separated list of events to enable or 
disable particular tracking events. The default is to enable all events. 

Trackable components, in this case videos, have built-in logic that determines when to send event information to the tracker. This built-in logic is all you need in most cases. 

You will need to make sure the TrackingManger Component has been added to the client's video viewer. This is done within the Scene7 UI by drag the TrackingManager component from COMPONENTS > SCENE7COMMON and drop it on the stage of the viewer. This action enables all tracking.


The "s7ComponentEvent function is a function that automatically gets called when one of the events are triggered. There is no need to add event listeners to the various events. If the TrackingManager has been set up, then the events defined will automatically call this function. 

The event data includes the name/id of the originating Flash object, the name of the emitting component, and event-specific details. 

 window.s7ComponentEvent = function(a,b,c,d,e){
  console.log("****** tracking event ******");

Every time your viewer emits one of the registered events, the event data will be logged in the console like so:


This shows all the data that is available for that specific event. 

Below is a simple script that will trigger a call on all enabled events. This will output five variables:

  • event_type - This will always be "video" in this instance. 
  • event_name - This will be the name of the event. (i.e. PLAY, PAUSE, MILESTONE, etc.)
  • video_name - If available, this outputs the name of the video. 
  • video_milestone - The milestone reached. (i.e. 25,50,75,0) "0" is complete.
  • video_position - The position in the video where the event took place. 

You can add these as data sources in your Tealium IQ profile and use them in the mappings for the tags. 

To configure this code: 

  1. Add a JavaScript Code Extension.
  2. Give the Extension a title. Something like "Scene7 Video Tracking" will suffice.
  3. Scope the Extension to PreLoader.
  4. Copy the code at the bottom of this post and paste it into the extension.
  5. Save/Publish


Again the "s7ComponentEvent" function will automatically get called whenever an event is initiated. All that is needed is to define the function before the events are triggered. Because the function has to load before the events are initiated, we recommend placing this function in a JS Code Extension scoped to PreLoader. 

window.s7ComponentEvent = function(objID, compClass, instName, timeStamp, eventData){
    var values = eventData.split(',');
    var vid_data = {}
    vid_data.event_name = values[0];
    vid_data.event_type = "video";
    if(typeof s7params!="undefined"){
        vid_data.video_name = s7params.viewerName;
        vid_data.video_milestone = values[1];
    }else if(values[0] != "LOAD"){
        vid_data.video_position = values[1];