> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/integrations/shopify-to-google-analytics/create-a-measurement-protocol-api-secret-in-ga4.md).

# Create a Measurement Protocol API secret in GA4

Create a Measurement Protocol API secret in GA4 for server-side tracking

To enable Littledata to add server-side events to your Data Stream via the Measurement Protocol API, you need to create a new **Measurement Protocol API secret** for your Data Stream:

{% stepper %}
{% step %}
**Open your Data Stream**

Go to your Google Analytics Admin > Data collection and modification > Data Streams, and **open your chosen stream**:

![](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-9639d6535088cdfcb5fbc8e91c72923731002b40%2Fmeasurement-protocol-api-data-stream-location.png?alt=media)
{% endstep %}

{% step %}
**Create a new API secret**

Scroll down to the **Events** tab and click **Measurement Protocol API secrets**. Then click **Create**:

![](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-b3705afd2fcb3a67b6785d28612c25add7172f01%2Fscreenshot-2023-07-24-at-11.09.40.png?alt=media)

![](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-b719deffe9924f1ed00133e07f222dffc31371bf%2Fscreenshot-2023-07-24-at-11.10.54.png?alt=media)
{% endstep %}

{% step %}
**Name the secret**

Create a nickname for your new API secret. We recommend naming it **Littledata**. Then click **Create**:

![](https://res.cloudinary.com/littledata/w_760,h_380,c_fit/littledata-blog-images/2020/11/Screenshot-2020-11-18-at-13.12.48.png)
{% endstep %}

{% step %}
**Copy the secret value**

Copy the **Secret value** provided.

*This value is confidential and should only be shared with Littledata.*

![](https://res.cloudinary.com/littledata/w_834,h_164,c_fit/littledata-blog-images/2020/11/Screenshot-2020-11-18-at-13.16.55.png)
{% endstep %}

{% step %}
**Done**

All done!
{% endstep %}
{% endstepper %}
