You can install multiple instances of the Google Analytics tracking code on your web pages to send data to multiple properties in your account.
Not all configurations are supported. You can, for example, install multiple instances of the Universal Analytics tracking code (analytics.js) on your web pages but only one instance of the Classic Analytics code (ga.js). Multiple instances of ga.js might result in inaccurate data collection, processing, or reporting. You can, however, install one or more instances of analytics.js on web pages that also have a single instance of ga.js.
To use two new Universal Analytics trackers on one site, you need to initialize them and send pageView like this:
ga('create', 'UA-11112222-3', 'auto'); // first tracker
ga('create', 'UA-33334444-5', 'auto', {'name': 'newTracker'}); // second tracker
To send a pageview using both trackers, you prepend the name of the tracker to the beginning of the command, followed by a dot:
ga('send', 'pageview'); // send page view for first tracker
ga('newTracker.send', 'pageview'); // Send page view for second tracker.
If you, however, want to have tracking with new (Universal Analytics) and old (Classic Analytics) code, then these two trackers should both work.
If you, however, have one UA and one GA tracker on the page, they both should work without further configuration. Is it possible that there is some kind of error which prevents tracker from working?
If you are using chrome there is very useful extension to debug analytics tracking: https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en
Sources:
- https://support.google.com/analytics/answer/1032400?hl=en
- https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#multipletrackers
- https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en