- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
There are two main parts to setting up tracking for Scene7 videos.
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:
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 ******"); console.log(a); console.log(b); console.log(c); console.log(d); console.log(e); }
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 utag.link call on all enabled events. This will output five variables:
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:
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; } if(values[0]=="MILESTONE"){ vid_data.video_milestone = values[1]; }else if(values[0] != "LOAD"){ vid_data.video_position = values[1]; } utag.link(vid_data) }
Copyright All Rights Reserved © 2008-2023