- Display Name
Step - Usability Focal Slice Y [BB]
- Internal Name
E_STEP_USABILITY_FOCAL_SLICE_Y
- Advanced Mode only
- True
- Description
- Focal Slice BB event for Usability data
- DisplayInPortal
- false
- Trigger
StepStart
JavaScript™: (Advanced Mode only)
// Step - Usability Focal Y Slice [BB]
function %%NameSpace%%$%%InternalName%%()
{ if ($P["TL.STEP_CLIENTSTATE_EVENT"].firstValue().toUpperCase() ==
"ATTENTION")
{ var pageHeight =
parseInt($P["TL.STEP_CLIENTSTATE_PAGE_HEIGHT"].firstValue());
var viewportHeight = $F.getLastFact("TL.F_E_STEP_USABILITY_ATTENTION_
VIEWPORT_HEIGHT_DG_NONE").
NumericValue;
var viewportOffsetY =
parseInt($P["TL.STEP_CLIENTSTATE_VIEWPORT_Y"].firstValue());
var focalY = (viewportHeight/2) + viewportOffsetY;
var sliceY = Math.floor(focalY / 10);
var sliceY = Math.min(sliceY, 1000);
//Cap slices at 1000 // Set fact for Report Group: No Dimension Report
//Group
$F.setFact("%%NameSpace%%.%%Fact1%%", sliceY);
}
}