Daisy-chained Direct Call Rule
The link above has the following code:
<a href="#" onClick="_satellite.track('master rule')">Daisy-chained Direct Call Rule</a>
Again, this rule doesn't contain an Analytics beacon, but uses the Third Party Sequential JavaScript to clear variables, set "global" variables which are needed in all beacons, then uses conditions to fire rules with additional logic:
s.clearVars()
s.channel=_satellite.getVar("Content: Site Section")
s.events="event2,event5"
if(document.location.href.indexOf("q=")!=-1){
     _satellite.track("search results")
}else{
     _satellite.track("basic page")
}
In this example, I'm setting my global page content variables (s.channel, s.events), then use conditional JavaScript to determine which direct call rule I should use to fire the analytics beacon (in this case, if the current URL has a "q=" in it, I want to fire a beacon that includes internal search info; otherwise, my basic page rule will work).
|