ga4-custom-defslisted
Install: claude install-skill arcbaslow/google-analytics-agent
# GA4: Custom Dimensions and Metrics
Scope required: `analytics.edit`.
## Limits (standard properties, GA4 360 in parens)
- Event-scoped custom dimensions: 50 (125)
- User-scoped custom dimensions: 25 (100)
- Item-scoped custom dimensions: 10 (25)
- Custom metrics: 50 (125)
Before creating, list current definitions to check headroom:
```
python scripts/ga4_admin.py --property X --custom-defs --json
```
## Commands
| Intent | Command |
|--------|---------|
| Add event-scoped dimension | `python scripts/ga4_admin.py --property X --add-custom-dim --parameter-name brand --display-name "Brand" --scope EVENT` |
| Add item-scoped dimension | `python scripts/ga4_admin.py --property X --add-custom-dim --parameter-name item_brand --display-name "Item brand" --scope ITEM` |
| Add custom metric | `python scripts/ga4_admin.py --property X --add-custom-metric --parameter-name shipping_value --display-name "Shipping value" --measurement-unit CURRENCY` |
| Archive dimension | `python scripts/ga4_admin.py --archive-custom-dim properties/X/customDimensions/123 --json` |
| Archive metric | `python scripts/ga4_admin.py --archive-custom-metric properties/X/customMetrics/123 --json` |
## Validation
The script validates `parameter_name` before calling the API:
- Must start with a letter
- May contain letters, digits, underscores
- Length ≤ 40 (event-scoped) or 24 (user-scoped)
- Scope must be `EVENT`, `USER`, or `ITEM`
## When to use
- **EVENT**: per-event metadata that varies across hi