Google Shopping Merchant Conversions API client library for managing conversion sources and tracking.
82
Build a tool that retrieves and reports on conversion sources for a Google Merchant Center account.
Your tool should provide two main capabilities:
For the listing functionality, your implementation should:
For the individual retrieval functionality, your implementation should:
accounts/{account}/conversionSources/{conversion_source}@generates
def get_conversion_source_details(name: str) -> dict:
"""
Retrieve details of a specific conversion source.
Args:
name: The resource name of the conversion source
Format: accounts/{account}/conversionSources/{conversion_source}
Returns:
A dictionary containing the conversion source details including:
- name: The resource name
- state: The current state (ACTIVE, ARCHIVED, PENDING, etc.)
- source_type: Either "google_analytics_link" or "merchant_center_destination"
- details: Additional information specific to the source type
"""
pass
def list_all_conversion_sources(account_id: str, include_deleted: bool = False) -> list:
"""
List all conversion sources for a merchant account.
Args:
account_id: The merchant account ID
include_deleted: Whether to include archived/deleted sources
Returns:
A list of dictionaries, each containing conversion source information:
- name: The resource name
- state: The current state
- source_type: Either "google_analytics_link" or "merchant_center_destination"
"""
passProvides the API client for managing conversion sources in Google Merchant Center.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-google-shopping-merchant-conversionsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10