These instructions are for anyone using JRealtime Stats and who already has their own Google GA4 account set up. This will allow you to view GA data in your Joomla backend admin and also results from your Google Search Console.
Start by logging into your Joomla backend Admin and navigate to Components -> JRealtime Stats main Control Panel.
Select the Configuration button
Choose the tab headed Google Analytics and Search Console.
You'll need to enter your GA Property ID. To get this head over to your Google Analytics account.
In the Admin section here select Property -> Property Details and your Property ID will be displayed top right corner. Copy this ID to your clipboard and head back to your Joomla admin and paste this into the Property ID field.
If you also want to connect up to your Google Search Console, then in the next field enter the URL for your site as shown in Google Search Console, including https:// prefix and also www if used. In most cases it will be the full URL as shown in the example below.
However if your site has been verified ONLY by domain property verification and is showing in the console as the domain name without any prefix and the words 'domain property' underneath then you'll need as setting like this: sc-domain:yourdomainname.co.uk for it to work. At all times the actual URL part needs to match exactly what is shown in the Console.
I say 'ONLY' because sites I've later verified by the domain property after originally using another method, seem to work with just the full URL as shown in the below example.
Example configuration:
Click the Save Configuration at the top left.
Connect up your account
Final step is to connect up your GA account by allowing and authorising JRealtime Stats access to your account:
Click the Google Analytics button in the main Realtime Stats Control Panel in your Joomla admin.
You'll then be given the option to get the authorisation code to complete the setup.
Click the button to get your code. You'll be asked to log into your Google account and confirm that you agree to allow Realtime access to your GA data.
You'll then be whizzed over to the Realtime website where you'll see a lengthy authorisation code. Copy this and head back to your Joomla backend and paste it into the required field.
Click the Authenticate and Login button and you should then see your data load from your GA4 account.
If you have also linked up to your Google Search Console, there's a separate button in the Control Panel to access this.