Device Orientation

function getScrOrientation() { return (window.innerHeight > window.innerWidth) ? 'portrait' : 'landscape'; }

if (isMobileOrTablet()) { var _gaq = _gaq || []; var scrOrientation = getScrOrientation();

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]); } }); }

Around The Web

Comments are closed.

Breed Profile Finder