PSLS  •  

Touch Device Orientation

December 5, 2014 Written by pbadmin

window.addEventListener('load', function() { _gaq.push(['_trackEvent', 'Orientation', scrOrientation, undefined, undefined, true]); });

window.addEventListener('resize', function() { if (scrOrientation != getScrOrientation()) { scrOrientation = getScrOrientation(); _gaq.push(['_trackEvent', 'Orientation', 'changed to ' + scrOrientation, undefined, undefined, true]); } }); }

Comments are closed.