Setup instructions for Google Analytics 4

We just merged an option to upgrade to GA v4 into core:

https://github.com/discourse/discourse/commit/09b8a61f65e5a07e4fdec90ff996396b4512a40e

To upgrade to Universal Analytics v4 which uses gtag as a wrapper for analytics.js, head to Admin > Settings and search for ga_version. Switch this setting to v4_gtag and refresh to upgrade to version 4.

Be aware in upgrading to v4 you will need to change any custom events you’ve defined in theme components to use the new gtag API instead of ga.