If you’ve connected your WordPress website to a Google Analytics 4 property using MonsterInsights (the Google Analytics plugin that we use to track our website), you’ll need to create a Measurement Protocol API Secret to track events such as eCommerce Add to Cart, eCommerce purchases, form submissions, and more. It’s pretty simple to do. Just follow the steps below.
How to create your GA4 Measurement Protocol API Secret
Step 1: Go to analytics.google.com. Click Admin.
Step 2: Under the Property column, click into Data Streams and open the data stream connected to MonsterInsights.
Step 3: Scroll down to find Measurement Protocol API secrets. Click into it.
Step 4: Here you can Create a new API secret and give it a nickname.
Step 5: Now that your new API secret is created, make sure to copy the Secret Value.