Skip to content

feat(conversions): gmc conversions (Merchant API conversions/v1)#95

Merged
yasserstudio merged 1 commit into
mainfrom
feat/conversions
Jun 14, 2026
Merged

feat(conversions): gmc conversions (Merchant API conversions/v1)#95
yasserstudio merged 1 commit into
mainfrom
feat/conversions

Conversation

@yasserstudio

Copy link
Copy Markdown
Owner

What

Adds the conversions/v1 accounts.conversionSources sub-API — the 10th of 11 Merchant API sub-APIs gmc covers. A conversion source links a Merchant Center account to a conversion-measurement origin: a Merchant Center destination or a Google Analytics property link.

Commands

gmc conversions list | get <id> | create | update <id> | delete <id> | undelete <id>

  • create--ga-property <id> (GA link) or --merchant-center --currency <code> (MC destination), or --file for the full body (e.g. nested attributionSettings).
  • update — patches Merchant Center fields via a nested updateMask so the rest of the destination is untouched; --file + --update-mask for full control.
  • delete soft-archives; undelete restores (the :undelete colon-verb).

Implementation

  • New ConversionsService in @gmc-cli/api (mirrors notifications), plus new-sub-API plumbing: the conversions rate-limit bucket and OAuth-scope wiring (SubApi/SUB_APIS in api+auth, DEFAULT_RATE_LIMITS, SUB_API_SCOPES).
  • Field names, output-only fields, and RPC paths verified against the conversions_v1 discovery document.

Tests

+23 (api 146, cli 281). format:check / lint / typecheck / docs build all clean. Patch bump (api + cli) → v1.0.13.

Review

3-agent review (security/quality/API-correctness). Applied: dropped the output-only destination from the writable path (it's read-only per the discovery doc), marked GoogleAnalyticsLink.attributionSettings output-only, undelete sends the declared empty {} body, tightened the update body type, added a --file --update-mask test.

Adds the conversions/v1 accounts.conversionSources sub-API — the 10th of
11 Merchant API sub-APIs. A conversion source links an account to a
conversion-measurement origin: a Merchant Center destination or a Google
Analytics property link.

New ConversionsService (list/get/create/update/delete/undelete; delete
soft-archives, undelete restores via the :undelete colon-verb) and the
gmc conversions command group. create takes --ga-property or
--merchant-center --currency (or --file); update patches Merchant Center
fields via a nested updateMask. Adds the conversions rate-limit bucket and
OAuth-scope wiring. Field names, output-only fields, and RPC paths verified
against the conversions_v1 discovery document.
@yasserstudio yasserstudio merged commit 5feb1c6 into main Jun 14, 2026
7 checks passed
@yasserstudio yasserstudio deleted the feat/conversions branch June 14, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant