After going through validating events, you'll want to verify your implementation. The validation server validates that your events have the correct structure, but to verify that they are being sent correctly to your property, you'll need to do the following:
If you're not seeing your events after going through these steps, check troubleshooting for common implementation errors.
Send an event from a client
Choose your client:
In order for an event to be valid, it must have an app_instance_id
that has
already been used to send an event from the Google Analytics for Firebase SDK.
You will need to capture this ID client-side and include it in your call to the
Measurement Protocol. In send an event to your property, we use
"app_instance_id"
as the app_instance_id
. You will need to replace this with
a real app_instance_id
that comes from the SDK. See
are you using the correct app_instance_id for how to
make sure you're using a valid value.
Send an event to your property
After you have sent an event from a client and captured a valid
app_instance_id
, you'll be ready to send an event using the Measurement
Protocol. When verifying your implementation, you should send the exact event
that you're trying to measure using the Measurement Protocol.
For example, the following sends a refund event:
const firebaseAppId = `<firebase_app_id_value>`;
const apiSecret = `<secret_value>`;
fetch(`https://www.google-analytics.com/mp/collect?firebase_app_id=${firebaseAppId}&api_secret=${apiSecret}`, {
method: "POST",
body: JSON.stringify({
"app_instance_id": "app_instance_id",
"events": [{
"name": "refund",
"params": {
"currency": "USD",
"value": "9.99",
"transaction_id": "ABC-123"
}
}]
})
});
Check the Realtime view
After sending an event using the Measurement Protocol, check the Realtime view for your property. Events typically show up within a few seconds.
Go to the realtime view by opening Google Analytics, then going to Reports > Realtime in the left navigation. You'll want to focus on the bottom charts, such as "Event count by Event name" and "Conversions by Event name."