// A custom script for collecting geo-based analytic data // Should be specified in EB tag as a custom script for an ad: // // // And specify "cs=1" in the adServer.bs query string // Written by Uri Dor - Eyeblaster PS / Custom Development var ebGTCountryFromServer = "United States"; // written by the server var ebgeoAnalyticsDu = null; var firstClick = true; function ReportCustomInteractionWithGeo(intName) { var geoIntName = intName + "_GT_" + ebGTCountryFromServer; gEbDbg.always("ReportCustomInteractionWithGeo: sending custom interaction " + geoIntName); ebgeoAnalyticsDu.ebinteractionHandler(geoIntName); gEbDbg.always("done ReportCustomInteractionWithGeo: " + geoIntName); } function ebCCustomEventHandlers() { //Global Objects ///////////////////////////////////////////////// // gEbDisplayPage // gEbTI - holds areference to the window the code run on. // in i-frame it is the addineye doc. // gEbBanners // ------------------------ GENERAL EVENTS --------------------------------- this.onClientScriptsLoaded = function(objName) { //ref to the ebCBannerEye obj var bannerEye = eval(objName); } this.onBeforeAddRes = function(objName) { //ref to the ebCBannerEye obj ebgeoAnalyticsDu = eval(objName); //DU.ad - ref to the ad object (the object holds all ACM attributes as set in the system) //DU.ad.strDefaultFlash - ref to the default flash URL.... //DU.ad.panels - ref to the pannels array //DU.adData - ref to the adData obj that holds all data of the banner, // includes a ref to the ad obj, data from tags, data from BS... //DU.interactions - a ref to the interactions list. // access to interaction called "tamir" is done: //DU.interactions["tamir"]... // DU.adTI - tag insertor referencing the Assets window // (as opposed to gebTI that refers to the script window) // in i-frame mode du.adTI != gEbTI //functions: //du.myName - This function is used for generating name for resources. ReportCustomInteractionWithGeo("play"); } this.onHandleInteraction = function(objName, intName, strObjID) { // strObjID - the ID of the asset that triggered this interaction. if("_eyeblaster" == intName && firstClick) { ReportCustomInteractionWithGeo("click"); firstClick = false; } } // ------------------------ BANNER EVENTS --------------------------------- this.onBeforeDefaultBannerShow = function(objName) { // do something } this.onAfterDefaultBannerShow = function(objName) { // do something } this.onBeforeRichFlashShow = function(objName) { // do something } this.onAfterRichFlashShow = function(objName) { // do something } // ------------------------ PANEL EVENTS --------------------------------- this.onBeforePanelShow = function(objName, panelName) { //ref to the ebCBannerEye obj var DU = eval(objName); //DU.ad.panels[panelName] - ref to the pannel (ebCPanel) that triggered the event } this.onAfterPanelShow = function(objName, panelName) { // do something } this.onBeforePanelHide = function(objName, panelName) { // do something } this.onAfterPanelHide = function(objName, panelName) { // do something } // ------------------------ AD CLOSE EVENTS --------------------------------- this.onBeforeAdClose = function(objName) { // do something } this.onAfterAdClose = function(objName) { // do something } // ------------------------ INTRO/REMINDER/MINISITE EVENTS --------------------------------- this.onBeforeIntroShow = function(objName) { // do something } this.onAfterIntroShow = function(objName) { // do something } this.onBeforeIntroHide = function(objName) { // do something } this.onAfterIntroHide = function(objName) { // do something } this.onBeforeRemShow = function(objName) { // do something } this.onAfterRemShow = function(objName) { // do something } this.onBeforeRemHide = function(objName) { // do something } this.onAfterRemHide = function(objName) { // do something } this.onBeforeMiniSiteShow = function(objName) { // do something } this.onAfterMiniSiteShow = function(objName) { // do something } this.onBeforeMiniSiteHide = function(objName) { // do something } this.onAfterMiniSiteHide = function(objName) { // do something } }