This is Step 3 in our tutorial for setting up Google Analytics 4. The directions below assume you’ve already created a GA4 property, and have the MonsterInsights plugin active on your site with your Google Universal Analytics (UA) property set up using this plugin. (Go here if you’re not sure how your existing UA tag is being added to your site.)
The MonsterInsights plugin is a popular tool used to connect WordPress sites to Google Analytics. If you’re currently using the MonsterInsights plugin to ad the Universal Analytics (UA) tag to your site, it’s the logical choice to also add the GA4 tag to your site.
How to Add Your GA4 Tag to the MonsterInsights Plugin Settings
- In your WordPress dashboard go to Insights >> Settings.
- Scroll to the Google Authentication section. In the Dual Tracking Profile field, paste in your GA4 Measurement ID. The settings will save automatically.
- Next, you’ll need to get your Measurement Protocol API secret. Go to analytics.google.com. Click Admin.
- Under the Property column, click on Data Streams and open the data stream connected to MonsterInsights.
- Scroll down to find Measurement Protocol API secrets. Click on it.
- Click the Create button to create a new API secret.
You may need to review and acknowledge the Terms before creating your API secret. Click the Review Terms button and then click the I acknowledge button in the popup window.
- Give your key a Nickname and then click the Create button.
- Your Secret value will be created. Copy the key and return to the MonsterInsights Settings in your WordPress dashboard.
- Under Insights > Settings, paste the Secret value in the Measurement Protocol API Secret in the Google Authentication Section. The settings will save automatically.
For NerdPress clients, make sure to clear your site caches (WP Rocket, and Cloudflare or Sucuri) so that your plugin settings updates will go live on the front-end of your site.
- That’s it! Data should start showing up in your GA4 dashboard within about 24 hours.
To check that your Google Analytics tags are set up correctly, we recommend using the Google Tag Assistant website.
👉 Once you’re sure they’re added correctly, proceed to Step 4: Opt out of the automatic GA4 deployment.