I'm updating the old analytics to Universal Analytics, but i'm having problems.
<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-XXXXXXX-X', 'website.com');
ga('send', 'pageview');
</script>
That's is the new code i pasted in my head file. But when i use de Analytics debugger (for Chrome) and i run a command like:
ga("send", "event", "navigation", "Click", "Home");
I get a error like this (in debugger):
Command ignored. Unknown target: undefined
I'm getting realtime data in analytics, so i know that the code is working for simple tracking. Event tracking is the problem.
Can somebody help me?