How to connect a GA4 Measurement ID and API secret
MP Tracking Pixel needs two GA4 values before it can send events through the GA4 Measurement Protocol.
Required GA4 values
GA4 Measurement ID
This identifies the GA4 web data stream that should receive events.
The Measurement ID usually starts with G-, for example G-ABC123DEF.
Measurement Protocol API secret
This authorizes server-side event delivery to your GA4 property.
The API secret is different from the Measurement ID. MP Tracking Pixel stores it with your Tracking ID and uses it when sending events to GA4.
Add the values in MP Tracking Pixel
- Open MP Tracking Pixel in your Shopify admin.
- Go to Tracking IDs.
- Click Add tracking ID.
- Enter a name for the Tracking ID.
- Paste your GA4 Measurement ID.
- Paste your Measurement Protocol API secret.
- Review events and settings.
- Click Save.
Update or rotate the API secret
To replace a saved API secret:
- Go to Tracking IDs.
- Open the Tracking ID.
- Enter the new API secret in the API secret field.
- Click Save.
If an API secret is already saved, you can use View current value to reveal it in the app.
Common validation errors
If the Measurement ID is rejected, check that it starts with G- and contains only letters and numbers after the dash.
If the API secret is rejected, make sure the field is not empty when creating a new Tracking ID.