This documentation provides step-by-step instructions on how to create a Measurement Protocol API Secret Key in Google Analytics. This key allows you to securely authenticate and authorize API requests to send data to your Google Analytics account.
Prerequisites #
Before you begin, ensure that you have a Google Analytics account and the necessary permissions to create API keys. If you don’t have a Google Analytics account you can follow this guide to create a Google Analytics account.
Access your Google Analytics Account #
Go to your Google Analytics account dashboard.
Navigate to the Admin #
In the left-hand menu, click on the “Admin” tab. This will take you to the Admin section of your Google Analytics account.
Select Data Stream #
Under the “Property” column, click on “Data Streams.“
Choose an Existing Stream #
Choose the data stream for which you wish to generate the Measurement Protocol API Secret Key. To do so, click on the name of an existing stream.
Access Measurement Protocol API Secrets #
Within the selected data stream, click on “Measurement Protocol API Secrets.” This will open a new tab.
Review Terms #
In the newly opened tab, you will be required to acknowledge the terms and conditions before creating an API secret key. Click on the “Review Terms” button.
User Data Collection Acknowledgement #
After reviewing the terms, you will be presented with a user data collection acknowledgment pop-up window. Click on the “I acknowledge” button to confirm your acknowledgment.
Create API Secret Key #
Now, click on the “Create” button to generate your Measurement Protocol API Secret Key.
Name your API Secret Key #
In the pop-up window that appears, enter a name for your Measurement Protocol API Secret Key. This name should help you identify its purpose or usage.
Confirm and Create #
After naming your API secret key, click on the “Create” button to finalize the creation process.
API Key Created #
Your Measurement Protocol API Secret Key has now been successfully created and is ready for use.
You have successfully created a Measurement Protocol API Secret Key in Google Analytics, allowing you to securely send data to your Google Analytics account through the Measurement Protocol API Secret Key. Make sure to keep this key secure and use it in your API requests as needed.