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
- In Admin, under Data collection and modification, click Data streams.
Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to generate API secrets.
- Click Web, then click a web data stream.
- In the web stream details, click Measurement Protocol API Secrets.
- If necessary, review and accept the User Data Collection Acknowledgement.
- Click Create.
- Enter a nickname for the secret, then click Create.
- Click to copy the secret so you can paste it into your POST request.
Edit or delete an API secret
- In Admin, under Data collection and modification, click Data streams.
Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to edit or delete an API secret.
- Click Web, then click a web data stream.
- In the web stream details, click Measurement Protocol API Secrets.
- In the row for the relevant secret, click
- Click Edit to edit the secret nickname.
- Click Delete to delete the secret.