How to get your GA4 Measurement Protocol API Secret
The API Secret is required when you enable Custom events tracking. It lets the app send events to GA4 securely.
Steps
- Go to analytics.google.com
- Click Admin
- Under Property, click Data streams
- Open your Web stream (same one as your Measurement ID)
- Scroll to Measurement Protocol API secrets
- Click Create
- Enter a nickname (example:
Shopify App) - Click Create
- Copy the Secret value (shown once — save it somewhere safe)
- Paste it into AB: Google Analytics → Custom events → GA4 API Secret
- Click Save custom events
Important
- Create the secret on the same Web stream as your Measurement ID
- If you lose the secret, create a new one in GA4 and update the app
- Do not share your API secret publicly
Official documentation
Google Analytics Measurement Protocol (GA4)
Need help?
Message us in chat if you're unsure which stream to use.
Updated on: 07/06/2026
Thank you!