How to Get Your Google Analytics API Secret
To connect your property to Google Analytics, you'll need a GA4 Property ID and a Measurement Protocol API Secret.
Follow these steps to generate your API Secret:
-
Open Google Analytics
Go to Google Analytics and sign in.
Click the Admin icon in the lower left corner. -
Select Data Streams
Under the Property column, click Data Streams (You can copy your GA4 Property ID from this screen too). -
Open Measurement Protocol API Secrets
Click your data stream, then scroll down and click Measurement Protocol API secrets. -
Create a New API Secret
Click Create to add a new API secret.
Give it a nickname (for example, "Spyglasses"). -
Copy Your API Secret
After creating the secret, copy the Secret Value.
You'll need to paste this value into the integration form in your application.
Next Steps:
- Paste your API Secret and Property ID into the integration form in your app.
- If you need to create a GA4 property, see Google's official documentation.