Skip to content

Instantly share code, notes, and snippets.

@robertjmoore
Created August 11, 2012 18:13
Show Gist options
  • Save robertjmoore/3326098 to your computer and use it in GitHub Desktop.
Save robertjmoore/3326098 to your computer and use it in GitHub Desktop.
Pushing custom variables to GA to store the created month and year of a website visitor
_gaq.push(['_setCustomVar', 1, 'Join month', <%= "'#{cohort_month}'" %>, 1]);
_gaq.push(['_setCustomVar', 2, 'Join year', <%= "'#{cohort_year}'" %>, 1]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment