We are making the switch to Universal Analytics, the code below defines the author in the new tracking code.
script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxx-x', 'example.com');
ga('send', 'pageview', { 'dimension1': '<?=$author?>'});
</script>
The question is, if we have several authors, do we need to define them individually as a custom dimensions (1,2,3..etc) and pass each dimension via the pageview send?
Also, what about tracking events? For example, tracking errors on a form:
ga('send', 'Event', 'Signup Form', 'First Name', 'Error Code Desc', {'nonInteraction': 1}”
Is this put in the tracking code too? Or in the code for the form?