jquery - javascript / omniture - how to clear all properties of an object (s object) -


i'm using omniture , tracking various properties "s" variable tracking. example code i'm following calls function called s.clearvars() after each tracking event. error saying clearvars not valid function. know i'm supposed call clear tracking object? or how clear properties javascript object.

don't clear entire s object, contains lot of functions listening dom events , if clear those, you'll lose lot of functionality. i'm guessing want clear of custom variables populating on page (props, evars, events, products, etc). s.clearvars function "plugin" omniture consulting wrote clears of these values you. contact omniture account manager , ask him code, may or may not give you, depending on whether wants sell consulting hours or if knows talking about, or couple of simple loops:

function clearvars(){   (var i=0; < 75; i++) {     s['prop'+i]='';     s['evar'+i]='';     if(i<=5)       s['hier'+i]='';    }    svararr = ['pagename','channel','products','events','campaign','purchaseid','state','zip','server','linkname'];   (var i=0; < svararr.length ; i++) {      s[svararr[i]]='';    } } 

please note haven't tested code. shot hip.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -