Hi All,
The fix for both scenarios below:
You need to declare all of the events/evar you are tracking in the Adobe Analytics section, then in the custom code section. This is redundant because you can declare the events, and evars in the designated sections in DTM, but for whatever reason this works.
In the following example I have numeric events 9,10,11 and a counter event20 firing on a rule.
s.linkTrackVars="events,eVar5,eVar6,eVar10";
s.linkTrackEvents="event9,event10,event11,event20";
var event11varname = _satellite.getVar('dtmelementevent11');
var event10varname= _satellite.getVar('dtmelementevent10');
var event9varname = _satellite.getVar('dtmelementevent9');
s.events= "event11="+event11varname+", event10="+event10varname+", event9="+event9varname+",event20";
The following example for getLoadTime. This is implemented in the custom code setting that is in the tool setting for Adobe Analytics in which you can declare global page code.
/*
* Copyright 2011-2013 Adobe Systems, Inc.
* s_getLoadTime v1.36 - Get page load time in units of 1/10 seconds
*/
function s_getLoadTime(){if(!window.s_loadT){var b=new Date().getTime(),o=window.performance?performance.timing:0,a=o?o.requestStart:window.inHeadTS||0;s_loadT=a?Math.round((b-a)/100):''}return s_loadT}
/*
* Utility Function: split v1.5 (JS 1.0 compatible)
*/
s.split=new Function("l","d",""
+"var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x"
+"++]=l.substring(0,i);l=l.substring(i+d.length);}return a");
/*
* Plugin Utility: apl v1.1
*/
s.apl=new Function("l","v","d","u",""
+"var s=this,m=0;if(!l)l='';if(u){var i,n,a=s.split(l,d);for(i=0;i<a."
+"length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas"
+"e()));}}if(!m)l=l?l+d+v:v;return l");
/*
* Custom event saving getLoadTime
*/
if(s_getLoadTime())s.events=s.apl(s.events,'event30='+s_getLoadTime(),',',1);