Empty response from $keywordPlanServiceClient->generateForecastMetrics

2023-06-05 Thread Aqeel Ashraf
Hi,

I am using google-ads-php. It was working fine till tomorrow. Today we 
start getting empty response when I call:

$keywordPlanServiceClient = $googleAdsClient->getKeywordPlanServiceClient();

$estimateResults = array();
$retArray = array();
$strKeywords = explode(PHP_EOL, $_REQUEST['search_keywords']);
// Issues a request to generate forecast metrics based on the 
specific keyword plan ID.
$generateForecastMetricsResponse = $keywordPlanServiceClient->
generateForecastMetrics(
ResourceNames::forKeywordPlan($customerId, $keywordPlanId)
);
var_dump($generateForecastMetricsResponse);

Please let me know what will be the reason. I am using example 
AddKeywordPlan.php, using v12. Why it suddenly getting empty response?

Waiting for quick  response.

Aqeel Ashraf

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/7bf548eb-7b2c-4694-89c1-e6a76262ec77n%40googlegroups.com.


Re: empty response from $keywordplanserviceclient->generateforecastmetrics

2023-06-13 Thread Aqeel Ashraf
Hi,

I upgraded to V14. As GenerateForecastMetrics is removed, is there any 
example available for GenerateKeywordForecastMetrics()? So, I can see how I 
can use that and implement in my code. Thanks

On Friday, 9 June 2023 at 00:05:32 UTC+5 Google Ads API Forum Advisor wrote:

> Hi Aqeel,
>
> Thank you for reaching out to the Google Ads API support team.
>
> With regard to your concern, can you confirm if you already check this 
> blog post (
> https://ads-developers.googleblog.com/2023/04/ad-group-and-keyword-forecasts-being.html)
>  
> with regard to Ad group and keyword forecasts being removed in the Google 
> Ads API? If you haven't seen it yet, kindly check it and if you are using 
> KeywordPlanAdGroupForecast or KeywordPlanKeywordForecast in your 
> applications, update your applications to ensure that they can handle blank 
> responses.
>
> If this is not what is happening to you, kindly provide us with the 
> complete request and response logs with request ID generated in the API 
> side. This is so we could further investigate and provide appropriate 
> guidance. You can provide it via Reply privately to the author option. If 
> this option is not available, then send it instead on this email address 
> *googleadsa...@google.com*.
>
> Reference Links:
>
>- request -
> 
> https://developers.google.com/google-ads/api/docs/concepts/field-service#request
>  
>
> 
>  
>- response -
> 
> https://developers.google.com/google-ads/api/docs/concepts/field-service#response
>  
>
> 
>  
>- request ID -
> 
> https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id
>  
>
> 
>  
>
> This message is in relation to case "ref:_00D1U1174p._5004Q2m9VpD:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>  
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/2d50a125-6eaf-45b0-bf5b-640af18a318an%40googlegroups.com.


Re: empty response from $keywordplanserviceclient->generateforecastmetrics

2023-06-20 Thread Aqeel Ashraf
Hi,

When tried to call the generate keyword forecast metrices, then it shows 
"Internal Server Error", please see my code snipped below:

$generateKeywordForecastMetricsResponse = $KeywordPlanIdeaServiceClient->
generateKeywordForecastMetrics(
ResourceNames::forKeywordPlanCampaign($customerId, 
$keywordCampaignId)
);

The above code generates error, could you please let me know what's wrong 
in above code? Thanks
On Thursday, 15 June 2023 at 13:03:19 UTC+5 Google Ads API Forum Advisor 
wrote:

> Hi Aqeel,
>
> Thank you for getting back to us. 
>
> Moving forward to your concern, I am afraid that the sample code for 
> KeywordPlanCampaignForecstMetrics is not available in all client libraries 
> yet. However, you may try it using the API explorer. You may follow this 
> *document* to generate metrics. You may also check this link 
> https://developers.google.com/google-ads/api/rest/reference/rest/v14/customers/generateKeywordForecastMetrics
>  
> as a reference for Rest API.
>
> *Reference link*: 
>
>- *document* - 
>
> https://developers.google.com/google-ads/api/docs/keyword-planning/generate-forecast-metrics#generate-metrics
>  
>
>
> Let us know if this helps.
>
>   
> This message is in relation to case "ref:_00D1U1174p._5004Q2m9VpD:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3065e44a-8821-4346-97ef-8c188a9bfe7cn%40googlegroups.com.


Re: empty response from $keywordplanserviceclient->generateforecastmetrics

2023-06-21 Thread Aqeel Ashraf
I manage to move 1 step further. Please see details below:

$KeywordPlanIdeaServiceClient = $googleAdsClient->
getKeywordPlanIdeaServiceClient();
$reqArr = array("customerId" => $customerId, "currencyCode" => "EUR");
$generateKeywordForecastMetricsResponse = $KeywordPlanIdeaServiceClient->
generateKeywordForecastMetrics(
$campaigntoforecast, $reqArr);

When I run the above, it shows following error:

Request with ID McC5p-yikN36-NZTR_snFg has failed. Google Ads failure 
details:date_error: The string date's format
should be -mm-dd.

If I pass the date range, then it start showing Internal Server Error, 
please see below how I am passing the date range:

$KeywordPlanIdeaServiceClient = $googleAdsClient->
getKeywordPlanIdeaServiceClient();
$reqArr = array(
"customerId" => $customerId, 
"currencyCode" => "EUR", 
"forecastPeriod" => array(
"start_date" => "2023-07-1", 
"end_date" => "2024-06-30"
)
);
$generateKeywordForecastMetricsResponse = $KeywordPlanIdeaServiceClient->
generateKeywordForecastMetrics(
$campaigntoforecast, $reqArr);

Could you please have a look on above code and help send the forecastPeriod 
(date range) in correct format. Thanks


On Tuesday, 20 June 2023 at 21:26:49 UTC+5 Aqeel Ashraf wrote:

> Hi,
>
> When tried to call the generate keyword forecast metrices, then it shows 
> "Internal Server Error", please see my code snipped below:
>
> $generateKeywordForecastMetricsResponse = $KeywordPlanIdeaServiceClient->
> generateKeywordForecastMetrics(
> ResourceNames::forKeywordPlanCampaign($customerId, 
> $keywordCampaignId)
> );
>
> The above code generates error, could you please let me know what's wrong 
> in above code? Thanks
> On Thursday, 15 June 2023 at 13:03:19 UTC+5 Google Ads API Forum Advisor 
> wrote:
>
>> Hi Aqeel,
>>
>> Thank you for getting back to us. 
>>
>> Moving forward to your concern, I am afraid that the sample code for 
>> KeywordPlanCampaignForecstMetrics is not available in all client libraries 
>> yet. However, you may try it using the API explorer. You may follow this 
>> *document* to generate metrics. You may also check this link 
>> https://developers.google.com/google-ads/api/rest/reference/rest/v14/customers/generateKeywordForecastMetrics
>>  
>> as a reference for Rest API.
>>
>> *Reference link*: 
>>
>>- *document* - 
>>
>> https://developers.google.com/google-ads/api/docs/keyword-planning/generate-forecast-metrics#generate-metrics
>>  
>>
>>
>> Let us know if this helps.
>>
>>   
>> This message is in relation to case "ref:_00D1U1174p._5004Q2m9VpD:ref"
>>
>> Thanks,
>>   
>> [image: Google Logo] Google Ads API Team 
>>
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/2812fdca-3726-4f46-a201-d89e21b56306n%40googlegroups.com.


Re: empty response from $keywordplanserviceclient->generateforecastmetrics

2023-06-23 Thread Patrick P
Hey Aqeel -- your start_date should probably be 2023-07-01

On Thursday, June 22, 2023 at 5:32:07 AM UTC-6 Google Ads API Forum Advisor 
wrote:

> Hello Aqeel,
>
> For us to check this, can you provide us with the complete request and 
> response logs with request ID and request header generated on your end when 
> this occurs? This is so we could investigate further and provide 
> appropriate guidance.
>
> Reference links included in this email:
>
>
> request - 
> https://developers.google.com/google-ads/api/docs/concepts/field-service#request
> response - 
> https://developers.google.com/google-ads/api/docs/concepts/field-service#response
> request ID - 
> https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id
>
> request header - 
> https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers
>  
> This message is in relation to case "ref:_00D1U1174p._5004Q2m9VpD:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>  
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3068a015-cf8c-4cd7-9bc3-9b2cb44388f6n%40googlegroups.com.