Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2013 12:13
Show Gist options
  • Save anonymous/5318836 to your computer and use it in GitHub Desktop.
Save anonymous/5318836 to your computer and use it in GitHub Desktop.
Tag Generic Tracking Wordpress
<script>
if ({{pageName}} == 'article')
{
ga('set', 'dimension1', {{postCategory}});
ga('set', 'dimension2', {{postTitle}});
ga('set', 'dimension3', {{postType}});
}
if ({{pageName}} == 'archive')
{
ga('set', 'dimension4', {{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