Google Shopping Merchant Conversions API client library for managing conversion sources and tracking.
82
Build a service to initialize conversion tracking for an e-commerce merchant. The service should create conversion tracking sources to measure advertising effectiveness across different channels.
Your service must support creating two types of conversion sources:
For both types:
For direct tracking sources, also support:
def create_analytics_source(merchant_id: str, display_name: str, property_id: str) -> dict:
"""
Create a conversion source linked to an analytics property.
Args:
merchant_id: The merchant account identifier
display_name: Human-readable name for the source
property_id: The analytics property identifier
Returns:
dict with keys: 'source_id', 'state', 'display_name'
"""
pass
def create_direct_source(
merchant_id: str,
display_name: str,
currency_code: str,
attribution_model: str = "last_click"
) -> dict:
"""
Create a direct conversion tracking source.
Args:
merchant_id: The merchant account identifier
display_name: Human-readable name for the source
currency_code: 3-letter ISO currency code (e.g., 'USD', 'EUR')
attribution_model: Attribution model ('last_click', 'data_driven', or 'first_click')
Returns:
dict with keys: 'source_id', 'state', 'display_name', 'currency_code'
"""
pass@generates
Provides 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