tessl install tessl/pypi-google-shopping-merchant-conversions@1.0.0Google Shopping Merchant Conversions API client library for managing conversion sources and tracking.
Agent Success
Agent success rate when using this tile
82%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.17x
Baseline
Agent success rate without this tile
70%
Build a Python application that manages conversion tracking destinations for a merchant account in Google Merchant Center. The application should provide functionality to create, configure, and update conversion destinations with proper attribution settings.
Your application should implement the following features:
Create a new conversion destination with:
Update an existing conversion destination to modify:
Retrieve destination information to verify the configuration was applied correctly
Handle errors appropriately when invalid configurations are provided
conversion_manager.py that contains a class ConversionDestinationManagerclass ConversionDestinationManager:
"""Manages conversion tracking destinations for a merchant account."""
def __init__(self, merchant_id: str):
"""Initialize the manager with a merchant account ID.
Args:
merchant_id: The merchant account identifier
"""
pass
def create_destination(self, display_name: str, currency_code: str, attribution_model: str) -> str:
"""Create a new conversion destination.
Args:
display_name: The display name for the destination
currency_code: The currency code (e.g., "USD", "EUR")
attribution_model: The attribution model to use
Returns:
The identifier of the created destination
Raises:
ValueError: If any parameter is invalid
"""
pass
def update_destination(self, destination_id: str, display_name: str = None, attribution_model: str = None) -> None:
"""Update an existing conversion destination.
Args:
destination_id: The identifier of the destination to update
display_name: The new display name (optional)
attribution_model: The new attribution model (optional)
Raises:
ValueError: If the destination does not exist or parameters are invalid
"""
pass
def get_destination(self, destination_id: str) -> dict:
"""Retrieve destination information.
Args:
destination_id: The identifier of the destination
Returns:
A dictionary containing destination details with keys:
- 'destination_id': str
- 'display_name': str
- 'currency_code': str
- 'attribution_model': str
- 'state': str
Raises:
ValueError: If the destination does not exist
"""
passProvides the Google Shopping Merchant Conversions API client for managing conversion sources and destinations.
@satisfied-by