Skip to content

Instantly share code, notes, and snippets.

@padicode
Forked from anonymous/gist:5318836
Last active December 16, 2015 02:49
Show Gist options
  • Save padicode/5364916 to your computer and use it in GitHub Desktop.
Save padicode/5364916 to your computer and use it in GitHub Desktop.
<script>
if ({{pageName}} == 'article')
{
//set the dimension id that is set inside Google Analytics for each dimension
ga('set', 'dimension1', {{postCategory}});
ga('set', 'dimension3', {{postTitle}});
ga('set', 'dimension4', {{postType}});
}
if ({{pageName}} == 'archive')
{
ga('set', 'dimension5', {{archiveCategory}});
}
ga('send', 'pageview');
dataLayer.push({"event":"readyForMore"});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment