Google Analytics 4 Integration
Track payment conversions in GA4 via the Measurement Protocol.
Connect Dunmore to Google Analytics 4 to track payment events as conversions.
Setup
- In GA4, go to Admin > Data Streams > Your Stream
- Click Measurement Protocol API secrets and create a new secret
- Copy the Measurement ID (e.g.,
G-XXXXXXXXXX) and API Secret - Add a GA4 connector in the Dunmore console
Event Mapping
| Dunmore Event | GA4 Event | Details |
|---|---|---|
payment.settled | purchase | Includes value, currency, transaction_id |
payment.failed | payment_failed | Includes payment amount and endpoint |
The payer wallet address is used as the client_id.
Configuration
{
"type": "ga4",
"config": {
"measurementId": "G-XXXXXXXXXX",
"apiSecret": "your-measurement-protocol-secret"
},
"eventTypes": ["payment.settled", "payment.failed"]
}
API Example
curl -X POST https://api.dunmore.xyz/api/projects/{projectId}/connectors \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"type": "ga4",
"config": {
"measurementId": "G-XXXXXXXXXX",
"apiSecret": "YOUR_API_SECRET"
},
"eventTypes": ["payment.settled"]
}'