measurement-api
Installation
SKILL.md
Google Analytics 4 Measurement Protocol Client (measurement-api)
This skill enables agents to integrate and interact with Google Analytics 4 (GA4) by sending custom events using the asynchronous measurement-api Python client.
Key Features
- Asynchronous: Built on
httpxfor efficient, non-blocking network calls. - Connection Pooling: Supports async context manager syntax
async with MeasurementAPI(...)to share a connection pool. - Validation Mode: Integrates with
/debug/mp/collectto validate payloads without storing dummy data in reports. - Complex Parameters: Event parameters can be primitives, lists (e.g. e-commerce items), and dictionaries.