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 conversion tracking system that creates and configures conversion sources with different attribution models for multiple marketing channels. The system should support various attribution strategies and lookback windows to accurately measure marketing effectiveness across channels.
Your implementation must:
Create a function create_channel_conversion_source(merchant_id, channel_name, attribution_model, lookback_days, currency_code) that creates a new Merchant Center Destination conversion source for a marketing channel with specified attribution settings.
Create a function update_attribution_model(merchant_id, source_name, new_model, new_lookback_days) that updates an existing conversion source's attribution model and lookback window.
Create a function list_channel_attributions(merchant_id) that retrieves all conversion sources for a merchant account and returns their attribution configurations.
Support the following attribution models:
Handle attribution lookback windows ranging from 7 to 90 days.
accounts/{account_id}accounts/{account_id}/conversionSources/{source_id}Input:
merchant_id = "accounts/12345"
channel = "social_media"
model = "last_click"
lookback = 30
currency = "USD"Expected Behavior:
Input:
merchant_id = "accounts/12345"
source_name = "accounts/12345/conversionSources/conv_001"
new_model = "data_driven"
new_lookback = 60Expected Behavior:
Input:
merchant_id = "accounts/12345"Expected Behavior:
Provides conversion source management and attribution configuration for Google Merchant Center.
Create your test cases in: test_attribution_system.py