2 GA Global Site Tags at the same time

I need to insert 2 Google Analytics Global Site Tags at the same time, the suggested coding is as follows:

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111111111-1"></script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-111111111-1');
  gtag('config', 'UA-222222222-1');

As described here, is this okay?:


ยท Thanks in advance.