[GA4] Generate API secrets for Measurement Protocol

You need the Editor role for the property in order to generate API secrets.

An API secret is one of the required URL parameters when you send events to Analytics via Measurement Protocol. You generate API secrets for each data stream you want to use to send events. You can generate up to 10 secrets per data stream.

Generate API secrets in Analytics Admin

  1. In Admin, under Data collection and modification, click Data Streams.
  2. Click Web, then click a web data stream.
  3. In the web stream details, click Measurement Protocol API Secrets.
  4. If necessary, review and accept the User Data Collection Acknowledgement.
  5. Click Create.
  6. Enter a nickname for the secret, then click Create.
  7. Click Copy to copy the secret so you can paste it into your POST request.

Edit or delete an API secret

  1. In Admin, under Data collection and modification, click Data Streams.
  2. Click Web, then click a web data stream.
  3. In the web stream details, click Measurement Protocol API Secrets.
  4. In the row for the relevant secret, click More
  5. Click Edit to edit the secret nickname.
  6. Click Delete to delete the secret.

Was this helpful?

How can we improve it?
false
Search
Clear search
Close search
Main menu
15687649921586013761
true
Search Help Center
true
true
true
true
true
69256
false
false