Change Google Analytics Code

We can't watch the realtime visitors with the old code. The new code didn't run within existing <script type="text/javascript"></scripts>. It may cause of type declaration or wrting inside //<![CDATA[ declaration. So i decided to split the analytics code.
I don't understand what you mean. I copied existing if statement and there was also twice.