Y or N , country // Optional VARCHAR2(256) , firstName // Optional VARCHAR2(256) , age // Optional NUMBER(3) , gender // Optional CHAR(1) --> M or F , minIncome // Optional NUMBER(14,2) , maxIncome // Optional NUMBER(14,2) , educationLevel // Optional VARCHAR2(256) , extraField1 // Optional VARCHAR2(100) , extraField2 // Optional VARCHAR2(100) , extraField3 // Optional VARCHAR2(100) , extraField4 // Optional VARCHAR2(100) , extraField5 // Optional VARCHAR2(100) ) { var cm = new _cm("tid", "2", "vn2", "e4.0"); cm.cd = decodeCustomerID(customerID); cm.em = decodeCustomerID(customerEmail); // CustomerID is being passed in lieu of Email cm.sa = customerState; cm.ct = customerCity; cm.zp = customerZIP; cm.cy = country; cm.fn = firstName; cm.ag = age; cm.gd = gender; cm.ml = minIncome; cm.xl = maxIncome; cm.ed = educationLevel; cm.rg11 = extraField1; cm.rg12 = extraField2; cm.rg13 = extraField3; cm.rg14 = extraField4; cm.rg15 = extraField5; if (newsletterName && subscribe) { cm.nl = newsletterName; cm.sd = subscribe; } cm.writeImg(); } /* Creates an Error Tag * * returns nothing, causes a document.write of an image request for this tag. */ function cmCreateErrorTag() { var cm=new _cm("tid", "404", "vn2", "e4.0"); //DO NOT CHANGE THESE PARAMETERS // get the referrer from the frameset if (parent.cm_ref != null) { cm.rf = parent.cm_ref; parent.cm_ref = document.URL; } cm.pc = "Y"; cm.pi = getDefaultPageID(); cm.writeImg(); } // HELPER FUNCTIONS ----------------------------------------------------------- /* These functions are used by the tag-generating functions and/or may be used * in in general as convenience functions */ /* * Creates an acceptable default Page ID value to use for Pageview tags. * The default Page ID is based on the URL, and consists of the path and * filename (without the protocol, domain and query string). * * example: * returns "x/y/MyPage.asp" for the URL http://www.mysite.com/x/y/MyPage.asp */ function getDefaultPageID() { var pageName = window.location.pathname; // eliminates everything after "?" (for Opera browswers) var tempIndex1 = pageName.indexOf("?"); if (tempIndex1 != -1) { pageName = pageName.substr(0, tempIndex1); } // eliminates everything after "#" (for Opera browswers) var tempIndex2 = pageName.indexOf("#"); if (tempIndex2 != -1) { pageName = pageName.substr(0, tempIndex2); } // eliminates everything after ";" var tempIndex3 = pageName.indexOf(";"); if (tempIndex3 != -1) { pageName = pageName.substr(0, tempIndex3); } var slashPos = pageName.lastIndexOf("/"); if (slashPos == pageName.length - 1) { pageName = pageName + "default.asp"; /****************** SET TO DEFAULT DOC NAME */ } while (pageName.indexOf("/") == 0) { pageName = pageName.substr(1,pageName.length); } return(pageName); } if (defaultNormalize == null) { var defaultNormalize = null; } function myNormalizeURL(url, isHref) { var newURL = url; if (isHref) { // ... transform newURL here ... } if (defaultNormalize != null) { newURL = defaultNormalize(newURL, isHref); } return newURL; } // install normalization if (document.cmTagCtl != null) { var func = "" + document.cmTagCtl.normalizeURL; if (func.indexOf('myNormalizeURL') == -1) { defaultNormalize = document.cmTagCtl.normalizeURL; document.cmTagCtl.normalizeURL = myNormalizeURL; } } function decodeCustomerID(customerID) { return parseInt("0x"+customerID)-100000000; } //-->