Skip to content

Instantly share code, notes, and snippets.

@paulmkoch
Created May 15, 2014 16:31
Show Gist options
  • Save paulmkoch/b028ba11f235c1657ad7 to your computer and use it in GitHub Desktop.
Save paulmkoch/b028ba11f235c1657ad7 to your computer and use it in GitHub Desktop.
Viewport Dimensions
<script>
if (window.$) {
var width = $(window).width();
var height = $(window).height();
ga('send', 'event', 'Viewport', 'Size', width + 'x' + height, 0, {'nonInteraction': 1});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment