How can i put two GA codes on a site. I have this code:
(function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]
Your second tracker is overriding the first. It's not per se a problem to have multiple trackers per website, but you need multiple pageview (or other interaction) calls as well. Best way to do this is to use named trackers:
ga('create', 'UA-XXXX-Y', 'auto', 'tracker1'); ga('tracker1.send', 'pageview'); ga('create', 'UA-XXXX-Y', 'auto', 'tracker2'); ga('tracker2.send', 'pageview');
That way you can make interactions calls to specific trackers by prefixing the tracker name to the send method call.