Hi team,
I try to retrieve search_budget_lost_impression_share metric with Google Ads API on ad group level. But when I try to retrieve that metric I getting an error. Error like below:
When I looking google ads api document I saw this metric usable to ad group level but I getting this error when I try to retrieve this metric.
My code is below:
query = f"""
SELECT
campaign.id,
campaign.name,
customer.id,
customer.descriptive_name,
ad_group.id,
ad_group.name,
customer.currency_code,
segments.date,
metrics.clicks,
metrics.cost_micros,
metrics.impressions,
metrics.search_rank_lost_impression_share,
metrics.search_budget_lost_impression_share,
metrics.search_impression_share,
metrics.average_cpc,
metrics.conversions
FROM ad_group WHERE segments.date BETWEEN '{start_date}' AND '{end_date}'
"""
result_list = []
for customer in customer_ids:
print(customer)
result_list.append(ga_service.search_stream(customer_id=customer, query=query))