Dear Sir or Madame,
When I try to migrate 'SEARCH_QUERY_PERFORMANCE_REPORT' in Adwords API to
Google Ads API, I face some inconsistincies. I tried for 2 queries and
there are more records in the report by Google Ads API.
*Query in Adwords API:*
report_query = {
'reportName': 'campaign_report',
'dateRangeType': 'CUSTOM_DATE',
'reportType': 'SEARCH_QUERY_PERFORMANCE_REPORT',
'downloadFormat': 'CSV',
'selector': {
'fields': ['KeywordTextMatchingQuery', 'CampaignId', 'Query',
'QueryMatchTypeWithVariant'],
'dateRange': {'min': start_date_string, 'max': end_date_string}
}
}
report_query['selector']['predicates'] = {'field': 'CampaignId',
'operator': 'IN',
'values': campaign_list}
report_downloader.DownloadReport(report_query,
output,
client_customer_id=client_customer_id_input,
skip_report_header=True,
skip_column_header=False,
skip_report_summary=True,
include_zero_impressions=False)
output.seek(0)
report = pd.read_csv(output)
*Query in Google Ads API:*
client = GoogleAdsClient.load_from_dict(credentials, version='v10')
ga_service = client.get_service("GoogleAdsService")
query = f"""
SELECT segments.keyword.info.text,
campaign.id,
search_term_view.search_term,
segments.search_term_match_type
FROM search_term_view
WHERE campaign.id in {tuple(entity_ids)}
AND segments.date between start_date and end_date """
search_request = client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = customer_id
search_request.query = query
stream = ga_service.search_stream(search_request)
I also tried to filter by (end_date - 1) but there is still a difference.
Can you please help me to remove this difference?
Cheers
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/0813768f-0189-46c8-9a7c-8255d1cf6955n%40googlegroups.com.