I have just tested this out on my own site. After adding my analytics Tracking ID to the Discourse ga universal tracking code
site setting, I am seeing activity from the site on my Analytics page.
If you open your browser’s web inspector to its Console tab on your forum, you may see Content Security Policy violations listed there. If you are seeing errors, can you check to see if https://www.google-analytics.com
has been added to your Discourse site’s content security policy script src
setting? That source should be automatically added by Discourse when the universal tracking code is set, but possibly it hasn’t been added on your site.
If you are not seeing any Content Security Policy errors, then the problem may be with your the configuration on your Google Analytics account.