Skip to content

Instantly share code, notes, and snippets.

@robflaherty
Created June 15, 2015 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robflaherty/ecebc6d0846e7705048b to your computer and use it in GitHub Desktop.
Save robflaherty/ecebc6d0846e7705048b to your computer and use it in GitHub Desktop.
detect-ios-multitask
<script>
detectIOSMultitask(function(data) {
// data.event = 'load', 'enter', or 'exit'
console.log( data['event'], data['width'], data['height'] );
// Example Google Analytics event
ga('send', 'event', 'iOS Multitask', data['event'], data['width'] + 'x' + data['height'], {'nonInteraction': 1});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment