GA4 Measurement Protocol
Send Hardal analytics data directly to Google Analytics 4 using server-to-server integration to bypass client-side tracking limitations.Make sure to check the partner’s website and API documentation for the most up-to-date information and configurations.
Setup
Get GA4 Credentials
Go to Google Analytics → Admin → Data Streams → Select your stream → Measurement Protocol API secrets → Create new secret and copy Measurement ID (G-XXXXXXXX) and API Secret
Add Destination
Go to Hardal dashboard → Marketing Destinations → “Add Custom Destination” → Select “GA4 Measurement Protocol” template
Event Mapping
| Hardal Event | GA4 Event |
|---|---|
page_view | page_view |
click | click |
purchase | purchase |
add_to_cart | add_to_cart |
begin_checkout | begin_checkout |
view_item | view_item |
E-commerce Events
Purchase Event:Available Variables
##user_id##- User identifier (used as client_id)##session_id##- Session identifier##event_name##- Event name##page.url##- Current page URL##page.title##- Page title##page.referrer##- Referrer URL##properties.*##- Event properties##created_at##- Event timestamp