found something new. 
If I reduce the pagination number, the number of lost results reduces as 
well. Roughly the distribution follows 

plot points[(10000, 4.72),(5000, 2.12),(2500, .78),(1250, .43),(625, 
.30),(500, .24),(250, .03),(200,0.03)]

(via WolframAlpha), where the y-axis is in percent and the x-axis is the 
pagination number. 

The idea comes into my mind because of the *RECOMMENDED_PAGE_SIZE* parameter, 
used 
in AdWords API. However, both of the questions above remains:
1. Why getMetrics() loose results? 
2. How to find out, which keywords exactly were omitted during processing? 
and now
3. Is reducing the number of keywords/plan a valid workaround or do I miss 
something here? At least the documentation states, the amount of keywords 
per plan allowed is 10000. 

Alexander Orlov schrieb am Sonntag, 8. Mai 2022 um 16:10:57 UTC+2:

> Hi all! 
> (As usual) I'm working on migrating AdWords API to Ads API. 
> The use case is the following: 
>
> Feed an amount of keywords (paginating them by keyword plans a 10k) to 
> generateHistoricalMetrics($keywordPlanResource) and collect the results.
>
> To achieve this I followed rather closely the instructions at 
>
> https://developers.google.com/google-ads/api/docs/keyword-planning/generate-historical-metrics?hl=en
> and especially 
>
> https://developers.google.com/google-ads/api/docs/keyword-planning/generate-historical-metrics?hl=en#mapping_to_the_ui
> using KeywordPlanAdGroupKeywords (with a single ad group)
> and avoiding to pass a specific date range for now, relying on the default 
> value. 
>
> I had to apply some filters on my keywords because of 
> KEYWORD_HAS_INVALID_CHARS and KEYWORD_TEXT_TOO_LONG, but all the errors 
> which I'm aware of are gone now. 
>
> Now, I found out, that the KeywordPlanHistoricalMetrics object does *not* 
> contain any keyword id (of the form 
> customers/*/keywordPlanAdGroupKeywords/*) So, I have to rely on the correct 
> ordering. This is ok as it seems, that the original ordering of keywords is 
> preserved within the results. 
> https://developers.google.com/protocol-buffers/docs/encoding#optional
>
> But still I have the problem, that 
>
> count($keywordPlanServiceClient->generateHistoricalMetrics($keywordPlanResource)->getMetrics())
>  
> < count($passedKeywords)
>
> where each of $passedKeywords where passed to 
>
> new KeywordPlanAdGroupKeyword([
> 'text' => $passedKeyword,
> 'match_type' => KeywordMatchType::EXACT
> 'keyword_plan_ad_group' => $planAdGroupResource
> ]);
>
> So I have two questions here: 
>
> 1. Why getMetrics() does not yield the same amount of results as the 
> amount of passed keywords?
>
> 2. I'm struggling with debugging at this moment: Say, I want to know which 
> keywords are let out. Either for providing more information at this place 
> or just to skip them, and let my customer know, that these particular 
> keywords were not queried. How to do this, when although I have a 
> keyword-id for every passed keyword I cannot match the returned metrics to 
> them, because the KeywordPlanHistoricalMetrics object does not contain any 
> keyword id. 
>
>
> Cheers and thanks in advance 
>
> Alex
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e1bf0bb8-aa14-4adc-a93a-118ac371dbbbn%40googlegroups.com.
  • ge... Alexander Orlov
    • ... Alexander Orlov
      • ... Alexander Orlov
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... Alexander Orlov
            • ... Alexander Orlov
              • ... 'Lasse Bonner' via Google Ads API and AdWords API Forum

Reply via email to