Hi Aryeh, please read my request. I'm able to get keywords from
keyword_plan_ad_group_keyword report. Please check this example
https://github.com/googleads/google-ads-php/blob/827776059b1f459f9751bfa9855033f57b593043/examples/Planning/GenerateForecastMetrics.php. It returns as a result
$metrics = $forecast->getKeywordForecast();
printf(
"%d) Keyword ID: %s%s",
++$i,
$forecast->getKeywordPlanAdGroupKeyword(),
PHP_EOL
);Keyword ID $forecast->getKeywordPlanAdGroupKeyword() is in format which does not match with Keyword returned from keyword_plan_ad_group_keyword report.
$forecast->getKeywordPlanAdGroupKeyword() = "customers/XXXXXXX/keywordPlanKeywords/YYYYYY"
customers/{customer_id}/keywordPlanAdGroupKeywords/{kp_ad_group_keyword_id}
this info is on report page:
keyword_plan_ad_group_keyword.resource_name
Field description
Immutable. The resource name of the Keyword Plan ad group keyword. KeywordPlanAdGroupKeyword resource names have the form: customers/{customer_id}/keywordPlanAdGroupKeywords/{kp_ad_group_keyword_id}
To get text representation I must match
customers/XXXXXXX/keywordPlanKeywords/YYYYYY from Forecast report example with
customers/XXXX/keywordPlanAdGroupKeywords/YYYYYY from keyword_plan_ad_group_keyword report.
They are not equal each other so matching is not possible
But I need to match them to show in my Application
Keyword: "I like pizza" : {
"impressions": 0,
"clicks": 0,
"costMicros": "0"
}
"I like jazz": {
"impressions": 52.995262145996094,
"ctr": 0.2561069428920746,
"averageCpc": "777946",
"clicks": 13.572454452514648,
"costMicros": "10558639"
}
and so on.
Please help me to solve this issue.
Best, Vlad